RequestFixture |
RequestFixture.body(byte[] bytes,
String contentType) |
Sets the request body to be the given bytes, and adds a Content-Type request header of the given value.
|
RequestFixture |
RequestFixture.body(String text,
String contentType) |
Sets the request body to be the given string in utf8 bytes, and adds a Content-Type request header of the given value.
|
RequestFixture |
RequestFixture.file(String field,
String filename,
String data) |
Uploads a file via a multipart form (see RFC2388).
|
RequestFixture |
RequestFixture.form(Map<String,String> fields) |
Sets the fields on a multipart form (see RFC2388).
|
RequestFixture |
RequestFixture.header(CharSequence name,
String value) |
Set a request header value.
|
RequestFixture |
RequestFixture.localAddress(com.google.common.net.HostAndPort local) |
Set the local address to which this request is made.
|
RequestFixture |
RequestFixture.method(String method) |
Set the request method (case insensitive).
|
RequestFixture |
RequestFixture.pathBinding(String boundTo,
String pastBinding,
Map<String,String> pathTokens) |
Adds a path binding, with the given path tokens and parts.
|
RequestFixture |
RequestFixture.pathBinding(String boundTo,
String pastBinding,
Map<String,String> pathTokens,
String description) |
Adds a path binding, with the given path tokens and parts.
|
RequestFixture |
RequestFixture.pathBinding(Map<String,String> pathTokens) |
Adds a path binding, with the given path tokens.
|
RequestFixture |
RequestFixture.protocol(String protocol) |
Set the HTTP protocol for the request.
|
RequestFixture |
RequestFixture.registry(Action<? super RegistrySpec> action) |
Configures the context registry.
|
RequestFixture |
RequestFixture.remoteAddress(com.google.common.net.HostAndPort remote) |
Set the remote address from which the request is made.
|
static RequestFixture |
RequestFixture.requestFixture() |
Create a request fixture, for unit testing of handlers .
|
RequestFixture |
RequestFixture.responseHeader(CharSequence name,
String value) |
Set a response header value.
|
RequestFixture |
RequestFixture.serverConfig(Action<? super ServerConfigBuilder> action) |
Configures the server config to have no base dir and given configuration.
|
RequestFixture |
RequestFixture.timeout(int timeoutSeconds) |
Sets the maximum time to allow the handler under test to produce a result.
|
RequestFixture |
RequestFixture.uri(String uri) |
The URI of the request.
|