Uses of Class
org.mockserver.model.HttpRequest
Packages that use HttpRequest
Package
Description
-
Uses of HttpRequest in org.mockserver.authentication
Methods in org.mockserver.authentication with parameters of type HttpRequestModifier and TypeMethodDescriptionbooleanAuthenticationHandler.controlPlaneRequestAuthenticated(HttpRequest request) booleanChainedAuthenticationHandler.controlPlaneRequestAuthenticated(HttpRequest request) -
Uses of HttpRequest in org.mockserver.authentication.jwt
Methods in org.mockserver.authentication.jwt with parameters of type HttpRequestModifier and TypeMethodDescriptionbooleanJWTAuthenticationHandler.controlPlaneRequestAuthenticated(HttpRequest request) -
Uses of HttpRequest in org.mockserver.authentication.mtls
Methods in org.mockserver.authentication.mtls with parameters of type HttpRequestModifier and TypeMethodDescriptionbooleanMTLSAuthenticationHandler.controlPlaneRequestAuthenticated(HttpRequest request) -
Uses of HttpRequest in org.mockserver.client
Methods in org.mockserver.client that return HttpRequestModifier and TypeMethodDescriptionMockServerClient.retrieveRecordedRequests(RequestDefinition requestDefinition) Retrieve the recorded requests that match the httpRequest parameter, use null for the parameter to retrieve all requestsMethods in org.mockserver.client with parameters of type HttpRequestModifier and TypeMethodDescriptionMockServerClient.setRequestOverride(HttpRequest requestOverride) Deprecated.use withRequestOverride which is more consistent with MockServer API styleMockServerClient.withRequestOverride(HttpRequest requestOverride) -
Uses of HttpRequest in org.mockserver.closurecallback.websocketregistry
Methods in org.mockserver.closurecallback.websocketregistry with parameters of type HttpRequestModifier and TypeMethodDescriptionvoidWebSocketRequestCallback.handle(HttpRequest httpRequest) booleanWebSocketClientRegistry.sendClientMessage(String clientId, HttpRequest httpRequest, HttpResponse httpResponse) -
Uses of HttpRequest in org.mockserver.codec
Methods in org.mockserver.codec with parameters of type HttpRequestModifier and TypeMethodDescriptionJsonSchemaBodyDecoder.convertToJson(HttpRequest request, BodyMatcher<?> bodyMatcher) protected voidMockServerHttpToNettyHttpRequestEncoder.encode(io.netty.channel.ChannelHandlerContext ctx, HttpRequest httpRequest, List<Object> out) PathParametersDecoder.extractPathParameters(HttpRequest matcher, HttpRequest matched) PathParametersDecoder.normalisePathWithParametersForMatching(HttpRequest matcher) PathParametersDecoder.validatePath(HttpRequest matcher) Constructors in org.mockserver.codec with parameters of type HttpRequestModifierConstructorDescriptionJsonSchemaBodyDecoder(Configuration configuration, MockServerLogger mockServerLogger, Expectation expectation, HttpRequest httpRequest) -
Uses of HttpRequest in org.mockserver.cors
Methods in org.mockserver.cors with parameters of type HttpRequestModifier and TypeMethodDescriptionvoidCORSHeaders.addCORSHeaders(HttpRequest request, HttpResponse response) static booleanCORSHeaders.isPreflightRequest(Configuration configuration, HttpRequest request) -
Uses of HttpRequest in org.mockserver.dashboard
Methods in org.mockserver.dashboard that return types with arguments of type HttpRequestModifier and TypeMethodDescriptionMap<io.netty.channel.ChannelOutboundInvoker,HttpRequest> DashboardWebSocketHandler.getClientRegistry()Methods in org.mockserver.dashboard with parameters of type HttpRequestModifier and TypeMethodDescriptionvoidDashboardHandler.renderDashboard(io.netty.channel.ChannelHandlerContext ctx, HttpRequest request) -
Uses of HttpRequest in org.mockserver.echo.http
Fields in org.mockserver.echo.http with type parameters of type HttpRequestMethods in org.mockserver.echo.http that return HttpRequestMethods in org.mockserver.echo.http with parameters of type HttpRequestModifier and TypeMethodDescriptionprotected voidEchoServerHandler.channelRead0(io.netty.channel.ChannelHandlerContext ctx, HttpRequest request) -
Uses of HttpRequest in org.mockserver.examples.mockserver
Methods in org.mockserver.examples.mockserver that return HttpRequestModifier and TypeMethodDescriptionCallbackActionExamples.TestExpectationForwardCallback.handle(HttpRequest httpRequest) Methods in org.mockserver.examples.mockserver with parameters of type HttpRequestModifier and TypeMethodDescriptionCallbackActionExamples.TestExpectationForwardCallback.handle(HttpRequest httpRequest) CallbackActionExamples.TestExpectationResponseCallback.handle(HttpRequest httpRequest) -
Uses of HttpRequest in org.mockserver.filters
Methods in org.mockserver.filters that return HttpRequestMethods in org.mockserver.filters with parameters of type HttpRequest -
Uses of HttpRequest in org.mockserver.httpclient
Methods in org.mockserver.httpclient with parameters of type HttpRequestModifier and TypeMethodDescriptionNettyHttpClient.sendRequest(HttpRequest httpRequest) NettyHttpClient.sendRequest(HttpRequest httpRequest, long timeout, TimeUnit unit) NettyHttpClient.sendRequest(HttpRequest httpRequest, long timeout, TimeUnit unit, boolean ignoreErrors) NettyHttpClient.sendRequest(HttpRequest httpRequest, InetSocketAddress remoteAddress) NettyHttpClient.sendRequest(HttpRequest httpRequest, InetSocketAddress remoteAddress, Long connectionTimeoutMillis) NettyHttpClient.sendRequest(HttpRequest httpRequest, InetSocketAddress remoteAddress, Long connectionTimeoutMillis, boolean disableStreaming) -
Uses of HttpRequest in org.mockserver.llm
Methods in org.mockserver.llm with parameters of type HttpRequestModifier and TypeMethodDescriptionStubGenerationPromptBuilder.build(HttpRequest unmatchedRequest, List<Expectation> contextExpectations) default ParsedConversationProviderCodec.decode(HttpRequest request) -
Uses of HttpRequest in org.mockserver.llm.analysis
Method parameters in org.mockserver.llm.analysis with type arguments of type HttpRequestModifier and TypeMethodDescriptionAgentRunAnalyzer.buildCallGraph(List<HttpRequest> requests, Provider provider) Build a correlated call graph for an agent run: a node per message, a node per assistant tool call,NEXTedges along the message sequence,INVOKESedges from an assistant turn to the tool calls it made, andRESULTedges from a tool call to the tool message that returned its result (correlated by tool-call id, mirroring the matcher's correlation).AgentRunAnalyzer.inspectToolCalls(List<HttpRequest> requests, Provider provider, String toolName, String argumentsRegex) Count the assistant tool calls matchingtoolName(and, optionally, whose arguments matchargumentsRegex) across the canonical conversation decoded from the given requests.AgentRunAnalyzer.summarise(List<HttpRequest> requests, Provider provider) Summarise the canonical conversation's structure: message and assistant turn counts, the ordered sequence of tool-call names, the tool names a result was returned for, and the latest message's role. -
Uses of HttpRequest in org.mockserver.llm.client
Methods in org.mockserver.llm.client that return HttpRequestModifier and TypeMethodDescriptionAnthropicLlmClient.buildCompletionRequest(LlmBackend backend, ParsedConversation prompt) AzureOpenAiLlmClient.buildCompletionRequest(LlmBackend backend, ParsedConversation prompt) BedrockLlmClient.buildCompletionRequest(LlmBackend backend, ParsedConversation prompt) GeminiLlmClient.buildCompletionRequest(LlmBackend backend, ParsedConversation prompt) LlmClient.buildCompletionRequest(LlmBackend backend, ParsedConversation prompt) Build the outbound completion request (URL path, auth headers, request body) for the given backend and prompt.OllamaLlmClient.buildCompletionRequest(LlmBackend backend, ParsedConversation prompt) OpenAiLlmClient.buildCompletionRequest(LlmBackend backend, ParsedConversation prompt) OpenAiResponsesLlmClient.buildCompletionRequest(LlmBackend backend, ParsedConversation prompt) protected HttpRequestAbstractLlmClient.postJson(LlmBackend backend, String baseUrl, String path, String jsonBody) Build a POST request tobaseUrl + path, parsing the URL into host, port, and scheme so the transport can route it.Methods in org.mockserver.llm.client with parameters of type HttpRequestModifier and TypeMethodDescriptionLlmTransport.send(HttpRequest request, long timeoutMillis) Send the request and return the response, or throw on transport failure.NettyHttpClientLlmTransport.send(HttpRequest request, long timeoutMillis) -
Uses of HttpRequest in org.mockserver.llm.codec
Methods in org.mockserver.llm.codec with parameters of type HttpRequestModifier and TypeMethodDescriptionAnthropicCodec.decode(HttpRequest request) AzureOpenAiCodec.decode(HttpRequest request) BedrockCodec.decode(HttpRequest request) GeminiCodec.decode(HttpRequest request) OllamaCodec.decode(HttpRequest request) OpenAiChatCompletionsCodec.decode(HttpRequest request) OpenAiResponsesCodec.decode(HttpRequest request) -
Uses of HttpRequest in org.mockserver.llm.drift
Methods in org.mockserver.llm.drift that return HttpRequestModifier and TypeMethodDescriptionDriftDetector.RecordedExchange.recordedRequest()Returns the value of therecordedRequestrecord component.Constructors in org.mockserver.llm.drift with parameters of type HttpRequestModifierConstructorDescriptionRecordedExchange(HttpRequest recordedRequest, String recordedResponseBody) Creates an instance of aRecordedExchangerecord class. -
Uses of HttpRequest in org.mockserver.mappers
Methods in org.mockserver.mappers that return HttpRequestModifier and TypeMethodDescriptionFullHttpRequestToMockServerHttpRequest.mapFullHttpRequestToMockServerRequest(io.netty.handler.codec.http.FullHttpRequest fullHttpRequest, List<Header> preservedHeaders, byte[] originalRawBody, SocketAddress localAddress, SocketAddress remoteAddress, Protocol protocol) FullHttpRequestToMockServerHttpRequest.mapFullHttpRequestToMockServerRequest(io.netty.handler.codec.http.FullHttpRequest fullHttpRequest, List<Header> preservedHeaders, SocketAddress localAddress, SocketAddress remoteAddress, Protocol protocol) FullHttpRequestToMockServerHttpRequest.mapHeadersOnlyHttpRequestToMockServerRequest(io.netty.handler.codec.http.HttpRequest nettyHttpRequest, List<Header> preservedHeaders, SocketAddress localAddress, SocketAddress remoteAddress, Protocol protocol) Map the headers/method/path/query/cookies of a Netty HttpRequest (no body) to a MockServer HttpRequest.HttpServletRequestToMockServerHttpRequestDecoder.mapHttpServletRequestToMockServerRequest(jakarta.servlet.http.HttpServletRequest httpServletRequest) JDKCertificateToMockServerX509Certificate.setClientCertificates(HttpRequest httpRequest, Certificate[] clientCertificates) Methods in org.mockserver.mappers with parameters of type HttpRequestModifier and TypeMethodDescriptionMockServerHttpRequestToFullHttpRequest.getURI(HttpRequest httpRequest, Map<ProxyConfiguration.Type, ProxyConfiguration> proxyConfigurations) io.netty.handler.codec.http.FullHttpRequestMockServerHttpRequestToFullHttpRequest.mapMockServerRequestToNettyRequest(HttpRequest httpRequest) JDKCertificateToMockServerX509Certificate.setClientCertificates(HttpRequest httpRequest, Certificate[] clientCertificates) -
Uses of HttpRequest in org.mockserver.matchers
Methods in org.mockserver.matchers that return HttpRequestModifier and TypeMethodDescriptionHttpRequestPropertiesMatcher.getHttpRequest()MatchDifferenceCount.getHttpRequest()Methods in org.mockserver.matchers that return types with arguments of type HttpRequestModifier and TypeMethodDescriptionBinaryRequestPropertiesMatcher.getHttpRequests()DnsRequestPropertiesMatcher.getHttpRequests()HttpRequestMatcher.getHttpRequests()HttpRequestPropertiesMatcher.getHttpRequests()HttpRequestsPropertiesMatcher.getHttpRequests()Methods in org.mockserver.matchers with parameters of type HttpRequestModifier and TypeMethodDescriptionbooleanLlmConversationMatcher.matches(HttpRequest request) Matches the given request against all configured predicates.Constructors in org.mockserver.matchers with parameters of type HttpRequest -
Uses of HttpRequest in org.mockserver.metrics
Methods in org.mockserver.metrics with parameters of type HttpRequestModifier and TypeMethodDescriptionvoidMetricsHandler.renderMetrics(io.netty.channel.ChannelHandlerContext ctx, HttpRequest request) -
Uses of HttpRequest in org.mockserver.mock
Methods in org.mockserver.mock with parameters of type HttpRequestModifier and TypeMethodDescriptionHttpState.allMatchingExpectation(HttpRequest request) voidHttpState.clear(HttpRequest request) booleanExpectation.contains(HttpRequest httpRequest) HttpState.debugMismatch(HttpRequest request) HttpState.explainUnmatched(HttpRequest request) Retrieves recent requests that matched no expectation and, for each, computes ranked closest-expectation diagnostics with remediation hints.HttpState.findClosestMatchDiff(HttpRequest request) RequestMatchers.findClosestMatchDiff(HttpRequest httpRequest) HttpState.firstMatchingEarlyExpectation(HttpRequest headersOnly) Returns the first expectation whose matcher has respondBeforeBody=true, has no body matcher, and matches the supplied headers-only request.RequestMatchers.firstMatchingEarlyExpectation(HttpRequest headersOnlyRequest) booleanHttpState.handle(HttpRequest request, ResponseWriter responseWriter, boolean warDeployment) HttpState.retrieve(HttpRequest request) static voidHttpState.setPort(HttpRequest request) static ExpectationExpectation.when(HttpRequest httpRequest) Specify the HttpRequest to match against as follows:static ExpectationExpectation.when(HttpRequest httpRequest, int priority) Specify the HttpRequest to match against with a match priority as follows:static ExpectationExpectation.when(HttpRequest httpRequest, Times times, TimeToLive timeToLive) Specify the HttpRequest to match against for a limit number of times or time as follows:static ExpectationExpectation.when(HttpRequest httpRequest, Times times, TimeToLive timeToLive, int priority) Specify the HttpRequest to match against for a limit number of times or time and a match priority as follows: -
Uses of HttpRequest in org.mockserver.mock.action
Methods in org.mockserver.mock.action that return HttpRequestModifier and TypeMethodDescriptiondefault HttpRequestExpectationForwardAndResponseCallback.handle(HttpRequest httpRequest) Called for every request when expectation condition has been satisfied.ExpectationForwardCallback.handle(HttpRequest httpRequest) Called for every request when expectation condition has been satisfied.Methods in org.mockserver.mock.action with parameters of type HttpRequestModifier and TypeMethodDescriptionExpectationCallback.handle(HttpRequest httpRequest) Called for every request when expectation condition has been satisfied.default HttpRequestExpectationForwardAndResponseCallback.handle(HttpRequest httpRequest) Called for every request when expectation condition has been satisfied.ExpectationForwardAndResponseCallback.handle(HttpRequest httpRequest, HttpResponse httpResponse) Called for every response received from a proxied request, the return value is the returned by MockServer.ExpectationForwardCallback.handle(HttpRequest httpRequest) Called for every request when expectation condition has been satisfied.ExpectationResponseCallback.handle(HttpRequest httpRequest) Called for every request when expectation condition has been satisfied. -
Uses of HttpRequest in org.mockserver.mock.action.http
Methods in org.mockserver.mock.action.http that return HttpRequestMethods in org.mockserver.mock.action.http with parameters of type HttpRequestModifier and TypeMethodDescriptionprotected voidHttpForwardAction.adjustHostHeader(HttpRequest request) voidGrpcStreamResponseActionHandler.handle(GrpcStreamResponse grpcStreamResponse, io.netty.channel.ChannelHandlerContext ctx, HttpRequest request) HttpForwardActionHandler.handle(HttpForward httpForward, HttpRequest httpRequest) HttpForwardClassCallbackActionHandler.handle(HttpClassCallback httpClassCallback, HttpRequest request) voidHttpForwardObjectCallbackActionHandler.handle(HttpActionHandler actionHandler, HttpObjectCallback httpObjectCallback, HttpRequest request, ResponseWriter responseWriter, boolean synchronous, Runnable expectationPostProcessor) HttpForwardTemplateActionHandler.handle(HttpTemplate httpTemplate, HttpRequest originalRequest) HttpForwardValidateActionHandler.handle(HttpForwardValidateAction action, HttpRequest request) HttpForwardWithFallbackActionHandler.handle(HttpForwardWithFallback action, HttpRequest httpRequest) HttpLlmResponseActionHandler.handle(HttpLlmResponse httpLlmResponse, HttpRequest request) HttpOverrideForwardedRequestActionHandler.handle(HttpOverrideForwardedRequest httpOverrideForwardedRequest, HttpRequest request) HttpResponseClassCallbackActionHandler.handle(HttpClassCallback httpClassCallback, HttpRequest request) voidHttpResponseObjectCallbackActionHandler.handle(HttpActionHandler actionHandler, HttpObjectCallback httpObjectCallback, HttpRequest request, ResponseWriter responseWriter, boolean synchronous, Runnable expectationPostProcessor) HttpResponseTemplateActionHandler.handle(HttpTemplate httpTemplate, HttpRequest httpRequest) voidHttpSseResponseActionHandler.handle(HttpSseResponse httpSseResponse, io.netty.channel.ChannelHandlerContext ctx, HttpRequest request) voidHttpSseResponseActionHandler.handle(HttpSseResponse httpSseResponse, io.netty.channel.ChannelHandlerContext ctx, HttpRequest request, StreamingFormat format) voidHttpWebSocketResponseActionHandler.handle(HttpWebSocketResponse httpWebSocketResponse, io.netty.channel.ChannelHandlerContext ctx, HttpRequest request) HttpLlmResponseActionHandler.handleStreaming(HttpLlmResponse httpLlmResponse, HttpRequest request) Handle streaming LLM response by producing a list of SSE events.voidHttpActionHandler.processAction(HttpRequest request, ResponseWriter responseWriter, io.netty.channel.ChannelHandlerContext ctx, Set<String> localAddresses, boolean proxyingRequest, boolean synchronous) voidHttpActionHandler.processEarlyAction(HttpRequest request, Expectation expectation, io.netty.channel.ChannelHandlerContext ctx, ResponseWriter earlyResponseWriter, boolean synchronous) Dispatch an early-matched expectation before the request body has been received.protected HttpForwardActionResultHttpForwardAction.sendRequest(HttpRequest request, InetSocketAddress remoteAddress, Function<HttpResponse, HttpResponse> overrideHttpResponse) protected HttpForwardActionResultHttpForwardAction.sendRequest(HttpRequest request, InetSocketAddress remoteAddress, Function<HttpResponse, HttpResponse> overrideHttpResponse, boolean disableStreaming) Constructors in org.mockserver.mock.action.http with parameters of type HttpRequestModifierConstructorDescriptionHttpForwardActionResult(HttpRequest httpRequest, CompletableFuture<HttpResponse> httpResponse, Function<HttpResponse, HttpResponse> overrideHttpResponse) -
Uses of HttpRequest in org.mockserver.mock.crud
Methods in org.mockserver.mock.crud with parameters of type HttpRequestModifier and TypeMethodDescriptionCrudDispatcher.dispatch(HttpRequest request) CrudActionHandler.handleCreate(HttpRequest request) CrudActionHandler.handleDelete(HttpRequest request) CrudActionHandler.handleGetById(HttpRequest request) CrudActionHandler.handleList(HttpRequest request) CrudActionHandler.handlePatch(HttpRequest request) CrudActionHandler.handleUpdate(HttpRequest request) -
Uses of HttpRequest in org.mockserver.mock.diff
Methods in org.mockserver.mock.diff with parameters of type HttpRequestModifier and TypeMethodDescriptionTrafficDiffEngine.diff(HttpRequest expected, HttpRequest actual) Compute field-level diffs between two HTTP requests. -
Uses of HttpRequest in org.mockserver.model
Methods in org.mockserver.model that return HttpRequestModifier and TypeMethodDescriptionHttpRequest.clone()static HttpRequeststatic HttpRequestAfterAction.getHttpRequest()ExpectationStep.getHttpRequest()HttpRequestAndHttpResponse.getHttpRequest()LogEventRequestAndResponse.getHttpRequest()HttpOverrideForwardedRequest.getRequestOverride()static HttpRequeststatic HttpRequeststatic HttpRequeststatic HttpRequeststatic HttpRequestHttpRequest.removeHeader(String name) HttpRequest.removeHeader(NottableString name) HttpRequest.replaceHeader(Header header) Adds one header to match on as a Header object where the header values list can be a list of strings or regular expressions (for more details of the supported regex syntax see http://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html)static HttpRequestHttpRequest.request()static HttpRequestHttpRequest.shallowClone()HttpRequest.update(HttpRequest requestOverride, HttpRequestModifier requestModifier) HttpRequest.withBody(byte[] body) The body to match on as binary data such as a pdf or imageThe exact string body to match on such as "this is an exact string body"The exact string body to match on such as "this is an exact string body"The body match rules on such as using one of the Body subclasses as follows:HttpRequest.withClientCertificateChain(List<X509Certificate> clientCertificateChain) HttpRequest.withContentType(MediaType mediaType) HttpRequest.withCookie(String name, String value) Adds one cookie to match on, which the value is plain strings or regular expressions (for more details of the supported regex syntax see http://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html)HttpRequest.withCookie(Cookie cookie) Adds one cookie to match on as a Cookie object where the cookie values list can be a list of strings or regular expressions (for more details of the supported regex syntax see http://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html)HttpRequest.withCookie(NottableString name, NottableString value) Adds one cookie to match on or to not match on using the NottableString, each NottableString can either be a positive matching value, such as string("match"), or a value to not match on, such as not("do not match"), the string values passed to the NottableString can be a plain string or a regex (for more details of the supported regex syntax see http://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html)HttpRequest.withCookies(List<Cookie> cookies) The cookies to match on as a list of Cookie objects where the values or keys of each cookie can be either a string or a regex (for more details of the supported regex syntax see http://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html)HttpRequest.withCookies(Cookie... cookies) The cookies to match on as a varags Cookie objects where the values or keys of each cookie can be either a string or a regex (for more details of the supported regex syntax see http://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html)HttpRequest.withCookies(Cookies cookies) HttpRequest.withHeader(String name, String... values) Adds one header to match which can specified using plain strings or regular expressions (for more details of the supported regex syntax see http://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html)HttpRequest.withHeader(Header header) Adds one header to match on as a Header object where the header values list can be a list of strings or regular expressions (for more details of the supported regex syntax see http://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html)HttpRequest.withHeader(NottableString name, NottableString... values) Adds one header to match on or to not match on using the NottableString, each NottableString can either be a positive matching value, such as string("match"), or a value to not match on, such as not("do not match"), the string values passed to the NottableString can also be a plain string or a regex (for more details of the supported regex syntax see http://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html)HttpRequest.withHeaders(List<Header> headers) The headers to match on as a list of Header objects where the values or keys of each header can be either a string or a regex (for more details of the supported regex syntax see http://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html)HttpRequest.withHeaders(Header... headers) The headers to match on as a varags of Header objects where the values or keys of each header can be either a string or a regex (for more details of the supported regex syntax see http://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html)HttpRequest.withHeaders(Headers headers) HttpRequest.withKeepAlive(Boolean isKeepAlive) Match on whether the request was made using an HTTP persistent connection, also called HTTP keep-alive, or HTTP connection reuseHttpRequest.withLocalAddress(String localAddress) HttpRequest.withMethod(String method) The HTTP method to match on such as "GET" or "POST"HttpRequest.withMethod(NottableString method) The HTTP method all method except a specific value using the "not" operator, for example this allows operations such as not("GET")HttpRequest.withMethodSchema(String method) The HTTP method to match on as a JSON Schema for example:HttpRequest.withOriginalBody(byte[] originalBody) The path to match on such as "/some_mocked_path" any servlet context path is ignored for matching and should not be specified here regex values are also supported such as ".HttpRequest.withPath(NottableString path) The path to not match on for example not("/some_mocked_path") with match any path not equal to "/some_mocked_path", the servlet context path is ignored for matching and should not be specified hereregex values are also supported such as not(".HttpRequest.withPathParameter(String name, String... values) Adds one path parameter to match which can specified using plain strings or regular expressions (for more details of the supported regex syntax see http://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html)HttpRequest.withPathParameter(NottableString name, NottableString... values) Adds one path parameter to match on or to not match on using the NottableString, each NottableString can either be a positive matching value, such as string("match"), or a value to not match on, such as not("do not match"), the string values passed to the NottableString can also be a plain string or a regex (for more details of the supported regex syntax see http://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html)HttpRequest.withPathParameter(Parameter parameter) Adds one path parameter to match on as a Parameter object where the parameter values list can be a list of strings or regular expressions (for more details of the supported regex syntax see http://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html)HttpRequest.withPathParameters(List<Parameter> parameters) The path parameter to match on as a list of Parameter objects where the values or keys of each parameter can be either a string or a regex (for more details of the supported regex syntax see http://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html)HttpRequest.withPathParameters(Map<String, List<String>> parameters) The path parameter to match on as a Map<String, List<String>> where the values or keys of each parameter can be either a string or a regex (for more details of the supported regex syntax see http://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html)HttpRequest.withPathParameters(Parameter... parameters) The path parameter to match on as a varags Parameter objects where the values or keys of each parameter can be either a string or a regex (for more details of the supported regex syntax see http://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html)HttpRequest.withPathParameters(Parameters parameters) HttpRequest.withPathSchema(String path) The path to match on as a JSON Schema for example:HttpRequest.withProtocol(Protocol protocol) Match on whether the request was made over HTTP or HTTP2HttpRequest.withQueryStringParameter(String name, String... values) Adds one query string parameter to match which the values are plain strings or regular expressions (for more details of the supported regex syntax see http://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html)HttpRequest.withQueryStringParameter(NottableString name, NottableString... values) Adds one query string parameter to match on or to not match on using the NottableString, each NottableString can either be a positive matching value, such as string("match"), or a value to not match on, such as not("do not match"), the string values passed to the NottableString can also be a plain string or a regex (for more details of the supported regex syntax see http://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html)HttpRequest.withQueryStringParameter(Parameter parameter) Adds one query string parameter to match on as a Parameter object where the parameter values list can be a list of strings or regular expressions (for more details of the supported regex syntax see http://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html)HttpRequest.withQueryStringParameters(List<Parameter> parameters) The query string parameters to match on as a list of Parameter objects where the values or keys of each parameter can be either a string or a regex (for more details of the supported regex syntax see http://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html)HttpRequest.withQueryStringParameters(Map<String, List<String>> parameters) The query string parameters to match on as a Map<String, List<String>> where the values or keys of each parameter can be either a string or a regex (for more details of the supported regex syntax see http://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html)HttpRequest.withQueryStringParameters(Parameter... parameters) The query string parameters to match on as a varags Parameter objects where the values or keys of each parameter can be either a string or a regex (for more details of the supported regex syntax see http://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html)HttpRequest.withQueryStringParameters(Parameters parameters) HttpRequest.withRemoteAddress(String remoteAddress) HttpRequest.withRespondBeforeBody(Boolean respondBeforeBody) Match this request without waiting for the body to be received, and send the configured response before the body is consumed.HttpRequest.withSchemaCookie(String name, String value) Adds one cookie to match on, which the value the values is JSON schema i.e. "{ \"type\": \"string\", \"pattern\": \"^someV[a-z]{4}$\" }" (for more details of the supported JSON schema see https://json-schema.org)HttpRequest.withSchemaHeader(String name, String... values) Adds one header to match which the values are JSON schema i.e. "{ \"type\": \"string\", \"pattern\": \"^someV[a-z]{4}$\" }" (for more details of the supported JSON schema see https://json-schema.org)HttpRequest.withSchemaPathParameter(String name, String... values) Adds one path parameter to match which the values are JSON schema i.e. "{ \"type\": \"string\", \"pattern\": \"^someV[a-z]{4}$\" }" (for more details of the supported JSON schema see https://json-schema.org)HttpRequest.withSchemaQueryStringParameter(String name, String... values) Adds one query string parameter to match which the values are JSON schema i.e. "{ \"type\": \"string\", \"pattern\": \"^someV[a-z]{4}$\" }" (for more details of the supported JSON schema see https://json-schema.org)HttpRequest.withSecure(Boolean isSecure) Match on whether the request was made over TLS or SSL (i.e.HttpRequest.withSocketAddress(Boolean isSecure, String host, Integer port) Specify remote address by attempting to derive it from the host header and / or the specified portHttpRequest.withSocketAddress(String host, Integer port) Specify remote address by attempting to derive it from the host header and / or the specified portHttpRequest.withSocketAddress(String host, Integer port, SocketAddress.Scheme scheme) Specify remote address if the remote address can't be derived from the host header, if no value is specified the host header will be used to determine remote addressHttpRequest.withSocketAddress(SocketAddress socketAddress) Specify remote address if the remote address can't be derived from the host header, if no value is specified the host header will be used to determine remote addressHttpRequest.withSocketAddressFromHostHeader()Specify remote address by attempting to derive it from the host headerHttpRequest.withStreamId(Integer streamId) HTTP2 stream id request was received onMethods in org.mockserver.model with parameters of type HttpRequestModifier and TypeMethodDescriptionstatic HttpOverrideForwardedRequestHttpOverrideForwardedRequest.forwardOverriddenRequest(HttpRequest httpRequest) Static builder which will allow overriding proxied request with the specified request.static HttpOverrideForwardedRequestHttpOverrideForwardedRequest.forwardOverriddenRequest(HttpRequest httpRequest, HttpRequestModifier requestModifier) Static builder which will allow overriding or modifying proxied request with the specified request.static HttpOverrideForwardedRequestHttpOverrideForwardedRequest.forwardOverriddenRequest(HttpRequest httpRequest, HttpRequestModifier requestModifier, HttpResponse httpResponse, HttpResponseModifier responseModifier) Static builder which will allow overriding proxied request with the specified request.static HttpOverrideForwardedRequestHttpOverrideForwardedRequest.forwardOverriddenRequest(HttpRequest httpRequest, HttpResponse httpResponse) Static builder which will allow overriding proxied request with the specified request.HttpRequest.update(HttpRequest requestOverride, HttpRequestModifier requestModifier) AfterAction.withHttpRequest(HttpRequest httpRequest) ExpectationStep.withHttpRequest(HttpRequest httpRequest) HttpRequestAndHttpResponse.withHttpRequest(HttpRequest httpRequest) LogEventRequestAndResponse.withHttpRequest(HttpRequest httpRequest) HttpOverrideForwardedRequest.withRequestOverride(HttpRequest httpRequest) All fields, headers, cookies, etc of the provided request will be overridden -
Uses of HttpRequest in org.mockserver.netty
Methods in org.mockserver.netty with parameters of type HttpRequestModifier and TypeMethodDescriptionprotected voidHttpRequestHandler.channelRead0(io.netty.channel.ChannelHandlerContext ctx, HttpRequest request) voidOpenAPISpecHandler.renderOpenAPISpec(io.netty.channel.ChannelHandlerContext ctx, HttpRequest request) -
Uses of HttpRequest in org.mockserver.netty.grpc
Methods in org.mockserver.netty.grpc with parameters of type HttpRequestModifier and TypeMethodDescriptionprotected voidGrpcToHttpRequestHandler.channelRead0(io.netty.channel.ChannelHandlerContext ctx, HttpRequest request) -
Uses of HttpRequest in org.mockserver.netty.http3
Methods in org.mockserver.netty.http3 that return HttpRequestModifier and TypeMethodDescriptionstatic HttpRequestHttp3RequestBridge.toHttpRequest(String method, String path, String scheme, String authority, List<Map.Entry<String, String>> headers, byte[] body) Build a MockServerHttpRequestfrom the HTTP/3 pseudo-headers and accumulated body bytes.static HttpRequestGrpcHttp3Adapter.transformGrpcRequest(HttpRequest request, GrpcProtoDescriptorStore descriptorStore) Transform a gRPC request for the MockServer matching pipeline: decode the gRPC length-prefixed message(s), convert protobuf to JSON via the descriptor store, and tag the request with service/method markers.Methods in org.mockserver.netty.http3 with parameters of type HttpRequestModifier and TypeMethodDescriptionvoidHttp3GrpcResponseWriter.sendResponse(HttpRequest request, HttpResponse response) voidHttp3ResponseWriter.sendResponse(HttpRequest request, HttpResponse response) static HttpRequestGrpcHttp3Adapter.transformGrpcRequest(HttpRequest request, GrpcProtoDescriptorStore descriptorStore) Transform a gRPC request for the MockServer matching pipeline: decode the gRPC length-prefixed message(s), convert protobuf to JSON via the descriptor store, and tag the request with service/method markers.voidHttp3GrpcResponseWriter.writeGrpcStreamResponse(GrpcStreamResponse grpcStreamResponse, HttpRequest request) Write a server-streaming gRPC response over HTTP/3: an initial HEADERS frame (:status=200,content-type=application/grpc, plus any configured headers), one DATA frame per message honouring per-messageDelay, then a trailing HEADERS frame carryinggrpc-status/grpc-message, followed by a QUIC stream output shutdown (or connection close when configured). -
Uses of HttpRequest in org.mockserver.netty.responsewriter
Methods in org.mockserver.netty.responsewriter with parameters of type HttpRequestModifier and TypeMethodDescriptionvoidEarlyNettyResponseWriter.sendResponse(HttpRequest request, HttpResponse response) voidNettyResponseWriter.sendResponse(HttpRequest request, HttpResponse response) -
Uses of HttpRequest in org.mockserver.openapi
Methods in org.mockserver.openapi that return HttpRequestModifier and TypeMethodDescriptionOpenApiContractTest.ContractTestResult.getRequestSent()static HttpRequestOpenApiRuntimeExpressionResolver.resolve(HttpRequest afterActionRequest, HttpRequest triggeringRequest) Resolves all OpenAPI runtime expressions in the after-action request using values from the triggering request.Methods in org.mockserver.openapi with parameters of type HttpRequestModifier and TypeMethodDescriptionstatic booleanOpenApiRuntimeExpressionResolver.containsExpressions(HttpRequest afterActionRequest) Returns true if the after-action HttpRequest contains any runtime expressions in its path, headers, Host header, or string body.static HttpRequestOpenApiRuntimeExpressionResolver.resolve(HttpRequest afterActionRequest, HttpRequest triggeringRequest) Resolves all OpenAPI runtime expressions in the after-action request using values from the triggering request.OpenAPIRequestValidator.validate(String specUrlOrPayload, HttpRequest request, MockServerLogger logger) Method parameters in org.mockserver.openapi with type arguments of type HttpRequestModifier and TypeMethodDescriptionOpenApiContractTest.runContractTests(String specUrlOrPayload, String baseUrl, String operationIdFilter, Function<HttpRequest, HttpResponse> httpSender) Runs contract tests for each operation in the spec.OpenApiResiliencyTest.runResiliencyTests(String specUrlOrPayload, String baseUrl, String operationIdFilter, Function<HttpRequest, HttpResponse> httpSender) Runs resiliency tests for each operation in the spec.OpenApiTrafficValidator.validate(String specUrlOrPayload, List<org.apache.commons.lang3.tuple.Pair<HttpRequest, HttpResponse>> requestResponsePairs) Validates a list of request/response pairs against the given OpenAPI spec.Constructors in org.mockserver.openapi with parameters of type HttpRequestModifierConstructorDescriptionContractTestResult(String operationId, String method, String path, HttpRequest requestSent, int statusCodeReceived, boolean passed, List<String> validationErrors) -
Uses of HttpRequest in org.mockserver.proxyconfiguration
Methods in org.mockserver.proxyconfiguration with parameters of type HttpRequestModifier and TypeMethodDescriptionProxyConfiguration.addProxyAuthenticationHeader(HttpRequest httpRequest) -
Uses of HttpRequest in org.mockserver.responsewriter
Methods in org.mockserver.responsewriter with parameters of type HttpRequestModifier and TypeMethodDescriptionprotected HttpResponseResponseWriter.addConnectionHeader(HttpRequest request, HttpResponse response) abstract voidResponseWriter.sendResponse(HttpRequest request, HttpResponse response) voidGrpcStreamResponseWriter.writeGrpcStreamResponse(GrpcStreamResponse grpcStreamResponse, HttpRequest request) Write the given server-streaming gRPC response: an initial HEADERS frame, one DATA frame per message (honouring per-message delays), then a trailing HEADERS frame carryinggrpc-status/grpc-message.voidResponseWriter.writeResponse(HttpRequest request, io.netty.handler.codec.http.HttpResponseStatus responseStatus) voidResponseWriter.writeResponse(HttpRequest request, io.netty.handler.codec.http.HttpResponseStatus responseStatus, String body, String contentType) voidResponseWriter.writeResponse(HttpRequest request, HttpResponse response, boolean apiResponse) -
Uses of HttpRequest in org.mockserver.serialization
Methods in org.mockserver.serialization that return HttpRequestModifier and TypeMethodDescriptionHttpRequestSerializer.deserialize(String jsonHttpRequest) HttpRequestSerializer.deserializeArray(String jsonHttpRequests) Methods in org.mockserver.serialization that return types with arguments of type HttpRequestMethods in org.mockserver.serialization with parameters of type HttpRequestModifier and TypeMethodDescriptionHttpRequestSerializer.serialize(boolean prettyPrint, HttpRequest httpRequest) HttpRequestSerializer.serialize(boolean prettyPrint, HttpRequest... httpRequests) HttpRequestSerializer.serialize(HttpRequest httpRequest) HttpRequestSerializer.serialize(HttpRequest... httpRequests) Method parameters in org.mockserver.serialization with type arguments of type HttpRequestModifier and TypeMethodDescriptionHttpRequestSerializer.serialize(boolean prettyPrint, List<HttpRequest> httpRequests) HttpRequestSerializer.serialize(List<HttpRequest> httpRequests) -
Uses of HttpRequest in org.mockserver.serialization.curl
Methods in org.mockserver.serialization.curl with parameters of type HttpRequestModifier and TypeMethodDescriptionHttpRequestToCurlSerializer.toCurl(HttpRequest request) HttpRequestToCurlSerializer.toCurl(HttpRequest request, InetSocketAddress remoteAddress) -
Uses of HttpRequest in org.mockserver.serialization.java
Methods in org.mockserver.serialization.java with parameters of type HttpRequestModifier and TypeMethodDescriptionHttpRequestToJavaSerializer.serialize(int numberOfSpacesToIndent, HttpRequest request) Method parameters in org.mockserver.serialization.java with type arguments of type HttpRequestModifier and TypeMethodDescriptionHttpRequestToJavaSerializer.serialize(List<HttpRequest> httpRequests) -
Uses of HttpRequest in org.mockserver.serialization.model
Methods in org.mockserver.serialization.model that return HttpRequestConstructors in org.mockserver.serialization.model with parameters of type HttpRequestModifierConstructorDescriptionHttpRequestDTO(HttpRequest httpRequest) HttpRequestPrettyPrintedDTO(HttpRequest httpRequest) -
Uses of HttpRequest in org.mockserver.serialization.serializers.request
Methods in org.mockserver.serialization.serializers.request with parameters of type HttpRequestModifier and TypeMethodDescriptionvoidHttpRequestSerializer.serialize(HttpRequest httpRequest, com.fasterxml.jackson.core.JsonGenerator jgen, com.fasterxml.jackson.databind.SerializerProvider provider) -
Uses of HttpRequest in org.mockserver.servlet.responsewriter
Methods in org.mockserver.servlet.responsewriter with parameters of type HttpRequestModifier and TypeMethodDescriptionvoidServletResponseWriter.sendResponse(HttpRequest request, HttpResponse response) -
Uses of HttpRequest in org.mockserver.templates
Methods in org.mockserver.templates with parameters of type HttpRequestModifier and TypeMethodDescriptionstatic HttpResponseResponseTemplateTester.testJavaScriptTemplate(String template, HttpRequest request) static HttpResponseResponseTemplateTester.testMustacheTemplate(String template, HttpRequest request) static HttpResponseResponseTemplateTester.testVelocityTemplate(String template, HttpRequest request) -
Uses of HttpRequest in org.mockserver.templates.engine
Methods in org.mockserver.templates.engine with parameters of type HttpRequestModifier and TypeMethodDescription<T> TTemplateEngine.executeTemplate(String template, HttpRequest httpRequest, Class<? extends DTO<T>> dtoClass) <T> TTemplateEngine.executeTemplate(String template, HttpRequest httpRequest, HttpResponse httpResponse, Class<? extends DTO<T>> dtoClass) -
Uses of HttpRequest in org.mockserver.templates.engine.javascript
Methods in org.mockserver.templates.engine.javascript with parameters of type HttpRequestModifier and TypeMethodDescription<T> TJavaScriptTemplateEngine.executeTemplate(String template, HttpRequest request, Class<? extends DTO<T>> dtoClass) <T> TJavaScriptTemplateEngine.executeTemplate(String template, HttpRequest request, HttpResponse response, Class<? extends DTO<T>> dtoClass) -
Uses of HttpRequest in org.mockserver.templates.engine.model
Constructors in org.mockserver.templates.engine.model with parameters of type HttpRequest -
Uses of HttpRequest in org.mockserver.templates.engine.mustache
Methods in org.mockserver.templates.engine.mustache with parameters of type HttpRequestModifier and TypeMethodDescription<T> TMustacheTemplateEngine.executeTemplate(String template, HttpRequest request, Class<? extends DTO<T>> dtoClass) <T> TMustacheTemplateEngine.executeTemplate(String template, HttpRequest request, HttpResponse response, Class<? extends DTO<T>> dtoClass) -
Uses of HttpRequest in org.mockserver.templates.engine.serializer
Methods in org.mockserver.templates.engine.serializer with parameters of type HttpRequestModifier and TypeMethodDescription<T> THttpTemplateOutputDeserializer.deserializer(HttpRequest request, String json, Class<? extends DTO<T>> dtoClass) -
Uses of HttpRequest in org.mockserver.templates.engine.velocity
Methods in org.mockserver.templates.engine.velocity with parameters of type HttpRequestModifier and TypeMethodDescription<T> TVelocityTemplateEngine.executeTemplate(String template, HttpRequest request, Class<? extends DTO<T>> dtoClass) <T> TVelocityTemplateEngine.executeTemplate(String template, HttpRequest request, HttpResponse response, Class<? extends DTO<T>> dtoClass) -
Uses of HttpRequest in org.mockserver.testing.integration.callback
Fields in org.mockserver.testing.integration.callback with type parameters of type HttpRequestModifier and TypeFieldDescriptionstatic final List<HttpRequest>StaticTestExpectationResponseCallback.httpRequestsMethods in org.mockserver.testing.integration.callback that return HttpRequestModifier and TypeMethodDescriptionPrecannedTestExpectationForwardCallbackRequest.handle(HttpRequest httpRequest) PrecannedTestExpectationForwardCallbackRequestAndResponse.handle(HttpRequest httpRequest) Methods in org.mockserver.testing.integration.callback with parameters of type HttpRequestModifier and TypeMethodDescriptionPrecannedTestExpectationForwardCallbackRequest.handle(HttpRequest httpRequest) PrecannedTestExpectationForwardCallbackRequestAndResponse.handle(HttpRequest httpRequest) PrecannedTestExpectationForwardCallbackRequestAndResponse.handle(HttpRequest httpRequest, HttpResponse httpResponse) PrecannedTestExpectationResponseCallback.handle(HttpRequest httpRequest) StaticTestExpectationResponseCallback.handle(HttpRequest httpRequest) -
Uses of HttpRequest in org.mockserver.testing.integration.mock
Methods in org.mockserver.testing.integration.mock that return HttpRequestModifier and TypeMethodDescriptionAbstractMockingIntegrationTestBase.getRequestModifier(HttpRequest httpRequest) Methods in org.mockserver.testing.integration.mock with parameters of type HttpRequestModifier and TypeMethodDescriptionAbstractMockingIntegrationTestBase.getRequestModifier(HttpRequest httpRequest) protected HttpResponseAbstractMockingIntegrationTestBase.makeRequest(HttpRequest httpRequest, Collection<String> headersToRemove) protected voidAbstractMockingIntegrationTestBase.verifyRequestsMatches(LogEventRequestAndResponse[] logEventRequestAndResponses, HttpRequest... httpRequestMatchers) protected voidAbstractMockingIntegrationTestBase.verifyRequestsMatches(RequestDefinition[] requestDefinitions, HttpRequest... httpRequestMatchers)