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, 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, trustStore, trustStore, urlEncodingEnabled, when, with
delete, 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, put, request, request, request, request, request, request, request, request
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.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
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()
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 parameterFilterableRequestSpecification removeHeader(String headerName)
headerName
- The header nameFilterableRequestSpecification
without the specified headerFilterableRequestSpecification removeCookie(String cookieName)
cookieName
- The cookie nameFilterableRequestSpecification
without the specified cookieFilterableRequestSpecification removeCookie(Cookie cookie)
cookie
- The cookieFilterableRequestSpecification
without the specified cookieFilterableRequestSpecification replaceHeader(String headerName, String newValue)
headerName
- The header name to replaceFilterableRequestSpecification
with the replaced headerFilterableRequestSpecification replaceCookie(String cookieName, String value)
cookieName
- The cookie nameFilterableRequestSpecification
with the replaced cookieFilterableRequestSpecification replaceCookie(Cookie cookie)
cookie
- The cookieFilterableRequestSpecification
with the replaced cookieFilterableRequestSpecification replaceHeaders(Headers headers)
headers
- The new headersFilterableRequestSpecification
with the replaced headersFilterableRequestSpecification replaceCookies(Cookies cookies)
cookies
- The new cookiesFilterableRequestSpecification
with the replaced cookiesFilterableRequestSpecification removeHeaders()
FilterableRequestSpecification
withoutFilterableRequestSpecification removeCookies()
FilterableRequestSpecification
with the replaced cookiesCopyright © 2010–2017. All rights reserved.