public interface QueryableRequestSpecification
String getBaseUri()
String getBasePath()
String getDerivedPath()
String getUserDefinedPath()
get("/something/{x}", x);Then this method would return
"/something/{x}"
.String getMethod()
String getURI()
int getPort()
String getContentType()
AuthenticationScheme getAuthenticationScheme()
Map<String,String> getRequestParams()
Map<String,String> getFormParams()
Map<String,String> getPathParams()
Map<String,String> getNamedPathParams()
Map<String,String> getUnnamedPathParams()
get("/{x}/{y}", "one", "two");then this method will return
{ "x" : "one, "y" : "two" }
. But if the request is missing the an unnamed path param for "y":
get("/{x}/{y}", "one");then this method will return
{ "x" : "one" }
.
If the request is defined like this:
get("/{x}/{y}", "one", "two", "three");then this method will return
{ "x" : "one, "y" : "two" }
.
If all you want is a list of the supplied unnamed path parameter (values) use getUnnamedPathParamValues()
.List<String> getUnnamedPathParamValues()
getUnnamedPathParams()
Map<String,String> getQueryParams()
List<MultiPartSpecification> getMultiPartParams()
Headers getHeaders()
Cookies getCookies()
<T> T getBody()
RestAssuredConfig getConfig()
org.apache.http.client.HttpClient getHttpClient()
AbstractHttpClient
is used by REST Assured.ProxySpecification getProxySpecification()
null
if undefined.List<String> getUndefinedPathParamPlaceholders()
get("/{x}/{y}");Calling
getPathParamPlaceholder()
will return a list with "x" and "y". Note that if you have a path like this:
get("/{x}/{x}");the list will include "x" twice. Also note that this function will only return those placeholders that are not yet defined. I.e. calling this method when the request is defined like this:
get("/{x}/{y}", "something");will only return a list of "y". Use
getPathParamPlaceholders()
to get ALL placeholders.getPathParamPlaceholders()
List<String> getPathParamPlaceholders()
get("/{x}/{y}");Calling
getPathParamPlaceholders()
will return a list with "x" and "y". Note that if you have a path like this:
get("/{x}/{x}");the list will include "x" twice. Note that this function will return all placeholders as they were when the user issued the request. I.e. calling this method when the request is defined like this:
get("/{x}/{y}", "something");will return a list of "x" and "y". Use
getUndefinedPathParamPlaceholders()
to get a list of only the placeholders that are
currently undefined ("y" in this case).getUndefinedPathParamPlaceholders()
Copyright © 2010–2019. All rights reserved.