public interface FilterableRequestSpecification extends RequestSpecification
accept, accept, and, auth, authentication, basePath, baseUri, body, body, body, body, body, body, body, config, content, content, content, content, content, content, content, contentType, contentType, cookie, cookie, cookie, cookies, cookies, cookies, expect, filter, filters, filters, formParam, formParam, formParameter, formParameter, formParameters, formParameters, formParams, formParams, given, header, header, headers, headers, headers, keystore, keystore, log, multiPart, multiPart, multiPart, multiPart, multiPart, multiPart, multiPart, multiPart, multiPart, multiPart, multiPart, multiPart, multiPart, noFilters, noFiltersOfType, param, param, parameter, parameter, parameters, parameters, params, params, pathParam, pathParameter, pathParameters, pathParameters, pathParams, pathParams, port, proxy, proxy, proxy, proxy, proxy, proxy, queryParam, queryParam, queryParameter, queryParameter, queryParameters, queryParameters, queryParams, queryParams, redirects, relaxedHTTPSValidation, relaxedHTTPSValidation, request, response, sessionId, sessionId, spec, specification, that, then, trustStore, urlEncodingEnabled, when, withdelete, delete, delete, delete, delete, get, get, get, get, get, head, head, head, head, head, options, options, options, options, options, patch, patch, patch, patch, patch, post, post, post, post, post, put, put, put, put, putString getBaseUri()
String getBasePath()
String getDerivedPath()
String getUserDefinedPath()
get("/something/{x}", x);
Then this method would return "/something/{x}".Method getMethod()
String getURI()
int getPort()
@Deprecated String getRequestContentType()
getContentType() instead.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.FilterableRequestSpecification path(String path)
get("/x");
You can change to path to "/y" instead using this method. This will result in a request that looks like this:
get("/y");
path - The pathList<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 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. 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()FilterableRequestSpecification removeFormParam(String parameterName)
parameterName - The parameter keyFilterableRequestSpecification without the parameterFilterableRequestSpecification removePathParam(String parameterName)
parameterName - The parameter keyFilterableRequestSpecification without the parameterFilterableRequestSpecification removeNamedPathParam(String parameterName)
parameterName - The parameter keyFilterableRequestSpecification without the parameterFilterableRequestSpecification removeUnnamedPathParam(String parameterName)
parameterName - The parameter keyFilterableRequestSpecification without the parameterFilterableRequestSpecification removeUnnamedPathParamByValue(String parameterValue)
parameterValue - The parameter keyFilterableRequestSpecification without the parameterFilterableRequestSpecification removeParam(String parameterName)
parameterName - The parameter keyFilterableRequestSpecification without the parameterFilterableRequestSpecification removeQueryParam(String parameterName)
parameterName - The parameter keyFilterableRequestSpecification without the parameterCopyright © 2010–2015. All rights reserved.