Package org.mockserver.client
Interface BreakpointRequestHandler
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Handler invoked when a REQUEST-phase breakpoint is hit. The paused request
is passed to the handler; the return value determines the resolution:
- Return an
HttpRequestto CONTINUE (forward the original or a modified request upstream). - Return an
HttpResponseto ABORT (write that response to the downstream client without forwarding).
The return type is HttpMessage so the handler can return either
an HttpRequest (continue/modify) or an HttpResponse (abort).
-
Method Summary
Modifier and TypeMethodDescriptionhandle(HttpRequest httpRequest) Handle a paused request at the REQUEST breakpoint phase.
-
Method Details
-
handle
Handle a paused request at the REQUEST breakpoint phase.- Parameters:
httpRequest- the request that was paused before being forwarded upstream- Returns:
- an
HttpRequestto continue/modify, or anHttpResponseto abort
-