public class HttpRequestModifier extends ObjectWithJsonToString
| Constructor and Description |
|---|
HttpRequestModifier() |
toStringfieldsExcludedFromEqualsAndHashCodepublic static HttpRequestModifier requestModifier()
public PathModifier getPath()
public HttpRequestModifier withPath(PathModifier path)
public HttpRequestModifier withPath(String regex, String substitution)
The regex and substitution values to use to modify matching substrings, if multiple matches are found they will all be modified with the substitution for full details of supported regex syntax see: http://docs.oracle.com/javase/7/docs/technotes/guides/security/SunProviders.html
The substitution can specify matching groups using $ followed by the group number for example $1
If a null or empty substitution string is provided the regex pattern will be used to remove any substring matching the regex
For example:
regex: ^/(.+)/(.+)$ substitution: /prefix/$1/infix/$2/postfix then: /some/path => /prefix/some/infix/path/postfix or: /some/longer/path => /prefix/some/infix/longer/path/postfix
regex - regex value to match onsubstitution - the value to substitute for the regexpublic QueryParametersModifier getQueryStringParameters()
public HttpRequestModifier withQueryStringParameters(QueryParametersModifier queryStringParameters)
public HttpRequestModifier withQueryStringParameters(Parameters add, Parameters replace, List<String> remove)
public HttpRequestModifier withQueryStringParameters(List<Parameter> add, List<Parameter> replace, List<String> remove)
public HeadersModifier getHeaders()
public HttpRequestModifier withHeaders(HeadersModifier headers)
public HttpRequestModifier withHeaders(List<Header> add, List<Header> replace, List<String> remove)
public CookiesModifier getCookies()
public HttpRequestModifier withCookies(CookiesModifier cookies)
public HttpRequestModifier withCookies(List<Cookie> add, List<Cookie> replace, List<String> remove)
public boolean equals(Object o)
equals in class ObjectWithReflectiveEqualsHashCodeToStringpublic int hashCode()
hashCode in class ObjectWithReflectiveEqualsHashCodeToStringCopyright © 2022. All rights reserved.