| Package | Description |
|---|---|
| com.google.api.client.http |
Subset of HTTP 1.1 needed from the specification in
RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1.
|
| com.google.api.client.testing.http |
Beta
Testing utilities used for writing tests based on this library. |
| Modifier and Type | Method and Description |
|---|---|
HttpRequest |
HttpRequestFactory.buildDeleteRequest(GenericUrl
Builds a
DELETE request for the given URL.
|
HttpRequest |
HttpRequestFactory.buildGetRequest(GenericUrl
Builds a
GET request for the given URL.
|
HttpRequest |
HttpRequestFactory.buildHeadRequest(GenericUrl
Builds a
HEAD request for the given URL.
|
HttpRequest |
HttpRequestFactory.buildPatchRequest(GenericUrl
Builds a
PATCH request for the given URL and content.
|
HttpRequest |
HttpRequestFactory.buildPostRequest(GenericUrl
Builds a
POST request for the given URL and content.
|
HttpRequest |
HttpRequestFactory.buildPutRequest(GenericUrl
Builds a
PUT request for the given URL and content.
|
HttpRequest |
HttpRequestFactory.buildRequest(String
Builds a request for the given HTTP method, URL, and content.
|
HttpRequest |
HttpResponse.getRequest()
Returns the HTTP request.
|
HttpRequest |
HttpRequest.setBackOffPolicy(BackOffPolicy
Deprecated.
(scheduled to be removed in 1.18). Use
setUnsuccessfulResponseHandler(HttpUnsuccessfulResponseHandler) with a new HttpBackOffUnsuccessfulResponseHandler instead.
|
HttpRequest |
HttpRequest.setConnectTimeout(int connectTimeout)
Sets the timeout in milliseconds to establish a connection or
0 for an infinite timeout.
|
HttpRequest |
HttpRequest.setContent(HttpContent
Sets the HTTP request content or
null for none.
|
HttpRequest |
HttpRequest.setContentLoggingLimit(int contentLoggingLimit)
Set the limit to the content size that will be logged during
execute().
|
HttpRequest |
HttpRequest.setCurlLoggingEnabled(boolean curlLoggingEnabled)
Sets whether logging in form of curl commands should be enabled for this request.
|
HttpRequest |
HttpRequest.setEncoding(HttpEncoding
Sets the HTTP content encoding or
null for none.
|
HttpRequest |
HttpRequest.setFollowRedirects(boolean followRedirects)
Sets whether to follow redirects automatically.
|
HttpRequest |
HttpRequest.setHeaders(HttpHeaders
Sets the HTTP request headers.
|
HttpRequest |
HttpRequest.setInterceptor(HttpExecuteInterceptor
Sets the HTTP request execute interceptor to intercept the start of
execute() (before executing the HTTP request) or
null for none.
|
HttpRequest |
HttpRequest.setIOExceptionHandler(HttpIOExceptionHandler
|
HttpRequest |
HttpRequest.setLoggingEnabled(boolean loggingEnabled)
Sets whether logging should be enabled for this request.
|
HttpRequest |
HttpRequest.setNumberOfRetries(int numRetries)
Sets the number of retries that will be allowed to execute before the request will be terminated or
0 to not retry requests.
|
HttpRequest |
HttpRequest.setParser(ObjectParser
Sets the
ObjectParser used to parse the response to this request or
null for none.
|
HttpRequest |
HttpRequest.setReadTimeout(int readTimeout)
Sets the timeout in milliseconds to read data from an established connection or
0 for an infinite timeout.
|
HttpRequest |
HttpRequest.setRequestMethod(String
Sets the HTTP request method or
null for none.
|
HttpRequest |
HttpRequest.setResponseHeaders(HttpHeaders
Sets the HTTP response headers.
|
HttpRequest |
HttpRequest.setResponseInterceptor(HttpResponseInterceptor
Sets the HTTP response interceptor or
null for none.
|
HttpRequest |
HttpRequest.setRetryOnExecuteIOException(boolean retryOnExecuteIOException)
Deprecated.
(scheduled to be removed in 1.18) Use
setIOExceptionHandler(HttpIOExceptionHandler) instead.
|
HttpRequest |
HttpRequest.setSleeper(Sleeper
Sets the sleeper.
|
HttpRequest |
HttpRequest.setSuppressUserAgentSuffix(boolean suppressUserAgentSuffix)
Sets whether to not add the suffix
USER_AGENT_SUFFIX to the User-Agent header.
|
HttpRequest |
HttpRequest.setThrowExceptionOnExecuteError(boolean throwExceptionOnExecuteError)
Sets whether to throw an exception at the end of
execute() on a HTTP error code (non-2XX) after all retries and response handlers have been exhausted.
|
HttpRequest |
HttpRequest.setUnsuccessfulResponseHandler(HttpUnsuccessfulResponseHandler
Sets the HTTP unsuccessful (non-2XX) response handler or
null for none.
|
HttpRequest |
HttpRequest.setUrl(GenericUrl
Sets the HTTP request URL.
|
| Modifier and Type | Method and Description |
|---|---|
static UrlEncodedContent |
UrlEncodedContent.getContent(HttpRequest
Returns the URL-encoded content of the given HTTP request, or if none return and set as content a new instance of
UrlEncodedContent (whose
UrlEncodedContent is an implementation of
Map).
|
boolean |
HttpIOExceptionHandler.handleIOException(HttpRequest
Invoked when an
IOException is thrown during an HTTP request.
|
boolean |
HttpBackOffIOExceptionHandler.handleIOException(HttpRequest
Invoked when an
IOException is thrown during an HTTP request.
|
boolean |
HttpBackOffUnsuccessfulResponseHandler.handleResponse(HttpRequest
Handler that will be invoked when an abnormal response is received.
|
boolean |
HttpUnsuccessfulResponseHandler.handleResponse(HttpRequest
Handler that will be invoked when an abnormal response is received.
|
void |
BasicAuthentication.initialize(HttpRequest
|
void |
HttpRequestInitializer.initialize(HttpRequest
Initializes a request.
|
void |
BasicAuthentication.intercept(HttpRequest
|
void |
HttpExecuteInterceptor.intercept(HttpRequest
Invoked at the start of
execute() before executing the HTTP request.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
MockHttpUnsuccessfulResponseHandler.handleResponse(HttpRequest
|