Class RestQuestion<T>
java.lang.Object
net.serenitybdd.screenplay.rest.questions.RestQuestion<T>
- All Implemented Interfaces:
Question<T>
A REST query that sends a GET request to an endpoint and returns a result of a given type.
Sample usage:
public static Question<Float> cashBalanceFor(Client client) {
return new RestQuestionBuilder<Float>().about("Cash account balance")
.to("/client/{clientId}/portfolio")
.withParameters(request -> request.pathParam("clientId", client.getId()))
.returning(response -> response.path("cash"));
}
-
Constructor Summary
ConstructorsConstructorDescriptionRestQuestion(String name, String endpoint, List<RestQueryFunction> queries, Function<io.restassured.response.Response, T> result) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.serenitybdd.screenplay.Question
as, asADate, asADate, asBigDecimal, asBoolean, asCollectionOf, asDouble, asEnum, asFloat, asInteger, asListOf, asLong, asString, describedAs, getSubject, map, mapEach
-
Constructor Details
-
RestQuestion
-
-
Method Details
-
toString
-
answeredBy
- Specified by:
answeredByin interfaceQuestion<T>
-