HttpRequestContextBuilder

A fluent-style builder for helping to create request contexts for unit testing of any HttpRequestHandler, HttpRequestFilter, ServerExceptionHandler, or any other components related to Handy-Httpd.

Members

Functions

build
HttpRequestContext build()

Builds the request context.

request
HttpRequestBuilder request()

Gets a reference to the request builder that will be used to create the context's request. Call and() after you're done using it to continue configuring the context.

response
HttpResponseBuilder response()

Gets a reference to the response builder that will be used to create the context's response. Call and() after you're done using it to continue configuring the context.

withRequest
HttpRequestContextBuilder withRequest(void delegate(HttpRequestBuilder) dg)

Modifies this builder's request with the given delegate.

withResponse
HttpRequestContextBuilder withResponse(void delegate(HttpResponseBuilder) dg)

Modifies this builder's response with the given delegate.

withServer
HttpRequestContextBuilder withServer(HttpServer server)

Configures the HTTP server that'll be used for this context.