|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.api.client.http.HttpTransport
com.google.api.client.testing.http.MockHttpTransport
public class MockHttpTransport
Mock for HttpTransport.
| Field Summary | |
|---|---|
EnumSet<HttpMethod> |
supportedOptionalMethods
Set of supported optional methods or HttpMethod.HEAD and HttpMethod.PATCH by
default. |
| Fields inherited from class com.google.api.client.http.HttpTransport |
|---|
defaultHeaders, intercepters |
| Constructor Summary | |
|---|---|
MockHttpTransport()
|
|
| Method Summary | |
|---|---|
LowLevelHttpRequest |
buildDeleteRequest(String url)
Builds a DELETE request. |
LowLevelHttpRequest |
buildGetRequest(String url)
Builds a GET request. |
LowLevelHttpRequest |
buildHeadRequest(String url)
Builds a HEAD request. |
LowLevelHttpRequest |
buildPatchRequest(String url)
Builds a PATCH request. |
LowLevelHttpRequest |
buildPostRequest(String url)
Builds a POST request. |
LowLevelHttpRequest |
buildPutRequest(String url)
Builds a PUT request. |
boolean |
supportsHead()
Returns whether this HTTP transport implementation supports the HEAD request method. |
boolean |
supportsPatch()
Returns whether this HTTP transport implementation supports the PATCH request method. |
| Methods inherited from class com.google.api.client.http.HttpTransport |
|---|
addParser, buildDeleteRequest, buildGetRequest, buildHeadRequest, buildPatchRequest, buildPostRequest, buildPutRequest, buildRequest, createRequestFactory, createRequestFactory, getParser, removeIntercepters, shutdown |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public EnumSet<HttpMethod> supportedOptionalMethods
HttpMethod.HEAD and HttpMethod.PATCH by
default.
| Constructor Detail |
|---|
public MockHttpTransport()
| Method Detail |
|---|
public LowLevelHttpRequest buildDeleteRequest(String url)
throws IOException
HttpTransportDELETE request.
buildDeleteRequest in class HttpTransporturl - URL
IOException - I/O exception
public LowLevelHttpRequest buildGetRequest(String url)
throws IOException
HttpTransportGET request.
buildGetRequest in class HttpTransporturl - URL
IOException - I/O exception
public LowLevelHttpRequest buildHeadRequest(String url)
throws IOException
HttpTransportHEAD request. Won't be called if HttpTransport.supportsHead() returns false
.
Default implementation throws an UnsupportedOperationException.
buildHeadRequest in class HttpTransporturl - URL
IOException - I/O exception
public LowLevelHttpRequest buildPatchRequest(String url)
throws IOException
HttpTransportPATCH request. Won't be called if HttpTransport.supportsPatch() returns false.
Default implementation throws an UnsupportedOperationException.
buildPatchRequest in class HttpTransporturl - URL
IOException - I/O exception
public LowLevelHttpRequest buildPostRequest(String url)
throws IOException
HttpTransportPOST request.
buildPostRequest in class HttpTransporturl - URL
IOException - I/O exception
public LowLevelHttpRequest buildPutRequest(String url)
throws IOException
HttpTransportPUT request.
buildPutRequest in class HttpTransporturl - URL
IOException - I/O exceptionpublic boolean supportsHead()
HttpTransportHEAD request method.
Default implementation returns false.
supportsHead in class HttpTransportpublic boolean supportsPatch()
HttpTransportPATCH request method.
Default implementation returns false.
supportsPatch in class HttpTransport
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||