public interface MockHttpRequest
Used as a shim between the server and client APIs that allow the
Modifier and Type | Method and Description |
---|---|
MockHttpRequest |
body(Object body)
Sets the body of the request.
|
MockHttpResponse |
execute()
Executes the request and returns the response.
|
MockHttpRequest |
header(String name,
Object value)
Sets a header on the request.
|
MockHttpRequest |
method(String method)
Sets the URI of the request.
|
MockHttpRequest |
uri(String uri)
Sets the URI of the request.
|
MockHttpRequest uri(String uri)
uri
- The URI of the request.MockHttpRequest method(String method)
method
- The URI of the request.MockHttpRequest header(String name, Object value)
name
- The header name.value
- The header value.MockHttpRequest body(Object body)
body
- The body of the request.MockHttpResponse execute() throws Exception
Exception
Copyright © 2016–2020 The Apache Software Foundation. All rights reserved.