| Package | Description |
|---|---|
| com.google.api.client.testing.http |
Beta
Testing utilities used for writing tests based on this library. |
| Modifier and Type | Method and Description |
|---|---|
MockLowLevelHttpResponse |
MockLowLevelHttpResponse.addHeader(String
Adds a header to the response.
|
MockLowLevelHttpResponse |
MockLowLevelHttpRequest.getResponse()
HTTP response to return from
MockLowLevelHttpRequest.
|
MockLowLevelHttpResponse |
MockLowLevelHttpResponse.setContent(byte[] byteContent)
Sets the response content to the given byte array.
|
MockLowLevelHttpResponse |
MockLowLevelHttpResponse.setContent(InputStream
Sets the input stream content of HTTP response or
null for none.
|
MockLowLevelHttpResponse |
MockLowLevelHttpResponse.setContent(String
Sets the response content to the given content string.
|
MockLowLevelHttpResponse |
MockLowLevelHttpResponse.setContentEncoding(String
Sets the content encoding or
null for none.
|
MockLowLevelHttpResponse |
MockLowLevelHttpResponse.setContentLength(long contentLength)
Sets the content length or
-1 for unknown.
|
MockLowLevelHttpResponse |
MockLowLevelHttpResponse.setContentType(String
Sets the content type of HTTP response or
null for none.
|
MockLowLevelHttpResponse |
MockLowLevelHttpResponse.setHeaderNames(List
Sets the list of header names of HTTP response.
|
MockLowLevelHttpResponse |
MockLowLevelHttpResponse.setHeaderValues(List
Sets the list of header values of HTTP response.
|
MockLowLevelHttpResponse |
MockLowLevelHttpResponse.setReasonPhrase(String
Sets the HTTP reason phrase or
null for none.
|
MockLowLevelHttpResponse |
MockLowLevelHttpResponse.setStatusCode(int statusCode)
Sets the status code of HTTP response.
|
MockLowLevelHttpResponse |
MockLowLevelHttpResponse.setZeroContent()
Sets the content to
null and the content length to 0.
|
| Modifier and Type | Method and Description |
|---|---|
MockHttpTransport |
MockHttpTransport.Builder.setLowLevelHttpResponse(MockLowLevelHttpResponse
Sets the
MockLowLevelHttpResponse that will be the result when the
MockLowLevelHttpRequest returned by
MockHttpTransport is executed.
|
MockLowLevelHttpRequest |
MockLowLevelHttpRequest.setResponse(MockLowLevelHttpResponse
Sets the HTTP response to return from
MockLowLevelHttpRequest.
|