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 name,
String value)
Adds a header to the response.
|
MockLowLevelHttpResponse |
MockLowLevelHttpRequest.getResponse()
HTTP response to return from
MockLowLevelHttpRequest.execute() . |
MockLowLevelHttpResponse |
MockLowLevelHttpResponse.setContent(byte[] byteContent)
Sets the response content to the given byte array.
|
MockLowLevelHttpResponse |
MockLowLevelHttpResponse.setContent(InputStream content)
Sets the input stream content of HTTP response or
null for none. |
MockLowLevelHttpResponse |
MockLowLevelHttpResponse.setContent(String stringContent)
Sets the response content to the given content string.
|
MockLowLevelHttpResponse |
MockLowLevelHttpResponse.setContentEncoding(String contentEncoding)
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 contentType)
Sets the content type of HTTP response or
null for none. |
MockLowLevelHttpResponse |
MockLowLevelHttpResponse.setHeaderNames(List<String> headerNames)
Sets the list of header names of HTTP response.
|
MockLowLevelHttpResponse |
MockLowLevelHttpResponse.setHeaderValues(List<String> headerValues)
Sets the list of header values of HTTP response.
|
MockLowLevelHttpResponse |
MockLowLevelHttpResponse.setReasonPhrase(String reasonPhrase)
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.Builder |
MockHttpTransport.Builder.setLowLevelHttpResponse(MockLowLevelHttpResponse lowLevelHttpResponse)
Sets the
MockLowLevelHttpResponse that will be the result when the MockLowLevelHttpRequest returned by MockHttpTransport.buildRequest(java.lang.String, java.lang.String) is executed. |
MockLowLevelHttpRequest |
MockLowLevelHttpRequest.setResponse(MockLowLevelHttpResponse response)
Sets the HTTP response to return from
MockLowLevelHttpRequest.execute() . |
Copyright © 2011–2019 Google. All rights reserved.