Package org.mockserver.model
Class HttpOverrideForwardedRequest
java.lang.Object
org.mockserver.model.ObjectWithReflectiveEqualsHashCodeToString
org.mockserver.model.ObjectWithJsonToString
org.mockserver.model.Action<HttpOverrideForwardedRequest>
org.mockserver.model.HttpOverrideForwardedRequest
- Author:
- jamesdbloom
-
Nested Class Summary
Nested classes/interfaces inherited from class org.mockserver.model.Action
Action.Direction, Action.Type -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic HttpOverrideForwardedRequestStatic builder which will allow overriding proxied request with the specified request.static HttpOverrideForwardedRequestforwardOverriddenRequest(HttpRequest httpRequest) Static builder which will allow overriding proxied request with the specified request.static HttpOverrideForwardedRequestforwardOverriddenRequest(HttpRequest httpRequest, HttpRequestModifier requestModifier) Static builder which will allow overriding or modifying proxied request with the specified request.static HttpOverrideForwardedRequestforwardOverriddenRequest(HttpRequest httpRequest, HttpRequestModifier requestModifier, HttpResponse httpResponse, HttpResponseModifier responseModifier) Static builder which will allow overriding proxied request with the specified request.static HttpOverrideForwardedRequestforwardOverriddenRequest(HttpRequest httpRequest, HttpResponse httpResponse) Static builder which will allow overriding proxied request with the specified request.getType()inthashCode()withRequestModifier(HttpRequestModifier requestModifier) Allow path, query parameters, headers and cookies to be modifiedwithRequestOverride(HttpRequest httpRequest) All fields, headers, cookies, etc of the provided request will be overriddenwithResponseModifier(HttpResponseModifier responseModifier) Allow headers and cookies to be modifiedwithResponseOverride(HttpResponse httpResponse) All fields, headers, cookies, etc of the provided response will be overriddenwithResponseTemplate(HttpTemplate responseTemplate) Template to transform the response using request and response contextMethods inherited from class org.mockserver.model.Action
getDelay, getExpectationId, isPrimary, setExpectationId, withDelay, withDelay, withPrimaryMethods inherited from class org.mockserver.model.ObjectWithJsonToString
toStringMethods inherited from class org.mockserver.model.ObjectWithReflectiveEqualsHashCodeToString
fieldsExcludedFromEqualsAndHashCode
-
Constructor Details
-
HttpOverrideForwardedRequest
public HttpOverrideForwardedRequest()
-
-
Method Details
-
forwardOverriddenRequest
Static builder which will allow overriding proxied request with the specified request. -
forwardOverriddenRequest
Static builder which will allow overriding proxied request with the specified request.- Parameters:
httpRequest- the HttpRequest specifying what to override
-
forwardOverriddenRequest
public static HttpOverrideForwardedRequest forwardOverriddenRequest(HttpRequest httpRequest, HttpRequestModifier requestModifier) Static builder which will allow overriding or modifying proxied request with the specified request.- Parameters:
httpRequest- the HttpRequest specifying what to overriderequestModifier- what to modify in the request
-
forwardOverriddenRequest
public static HttpOverrideForwardedRequest forwardOverriddenRequest(HttpRequest httpRequest, HttpResponse httpResponse) Static builder which will allow overriding proxied request with the specified request.- Parameters:
httpRequest- the HttpRequest specifying what to overridehttpResponse- the HttpRequest specifying what to override
-
forwardOverriddenRequest
public static HttpOverrideForwardedRequest forwardOverriddenRequest(HttpRequest httpRequest, HttpRequestModifier requestModifier, HttpResponse httpResponse, HttpResponseModifier responseModifier) Static builder which will allow overriding proxied request with the specified request.- Parameters:
httpRequest- the HttpRequest specifying what to overriderequestModifier- what to modify in the requesthttpResponse- the HttpRequest specifying what to overrideresponseModifier- what to modify in the response
-
getRequestOverride
-
withRequestOverride
All fields, headers, cookies, etc of the provided request will be overridden- Parameters:
httpRequest- the HttpRequest specifying what to override
-
getRequestModifier
-
withRequestModifier
Allow path, query parameters, headers and cookies to be modified- Parameters:
requestModifier- what to modify
-
getResponseOverride
-
withResponseOverride
All fields, headers, cookies, etc of the provided response will be overridden- Parameters:
httpResponse- the HttpResponse specifying what to override
-
getResponseModifier
-
withResponseModifier
Allow headers and cookies to be modified- Parameters:
responseModifier- what to modify
-
getResponseTemplate
-
withResponseTemplate
Template to transform the response using request and response context- Parameters:
responseTemplate- the template to use for transforming the response
-
getType
- Specified by:
getTypein classAction<HttpOverrideForwardedRequest>
-
equals
- Overrides:
equalsin classAction<HttpOverrideForwardedRequest>
-
hashCode
public int hashCode()- Overrides:
hashCodein classAction<HttpOverrideForwardedRequest>
-