Uses of Class
com.google.api.client.http.HttpRequest
Packages that use HttpRequest
Package
Description
Subset of HTTP 1.1 needed from the specification in RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1.
Beta Testing utilities used for writing tests based on this library.
-
Uses of HttpRequest in com.google.api.client.http
Fields in com.google.api.client.http declared as HttpRequestMethods in com.google.api.client.http that return HttpRequestModifier and TypeMethodDescriptionHttpRequestFactory.buildDeleteRequest(GenericUrl url) Builds aDELETErequest for the given URL.HttpRequestFactory.buildGetRequest(GenericUrl url) Builds aGETrequest for the given URL.HttpRequestFactory.buildHeadRequest(GenericUrl url) Builds aHEADrequest for the given URL.HttpRequestFactory.buildPatchRequest(GenericUrl url, HttpContent content) Builds aPATCHrequest for the given URL and content.HttpRequestFactory.buildPostRequest(GenericUrl url, HttpContent content) Builds aPOSTrequest for the given URL and content.HttpRequestFactory.buildPutRequest(GenericUrl url, HttpContent content) Builds aPUTrequest for the given URL and content.HttpRequestFactory.buildRequest(String requestMethod, GenericUrl url, HttpContent content) Builds a request for the given HTTP method, URL, and content.(package private) HttpRequestHttpTransport.buildRequest()Builds a request without specifying the HTTP method.HttpResponse.getRequest()Returns the HTTP request.HttpRequest.setBackOffPolicy(BackOffPolicy backOffPolicy) Deprecated.(scheduled to be removed in 1.18).HttpRequest.setConnectTimeout(int connectTimeout) Sets the timeout in milliseconds to establish a connection or0for an infinite timeout.HttpRequest.setContent(HttpContent content) Sets the HTTP request content ornullfor none.HttpRequest.setContentLoggingLimit(int contentLoggingLimit) Set the limit to the content size that will be logged duringHttpRequest.execute().HttpRequest.setCurlLoggingEnabled(boolean curlLoggingEnabled) Sets whether logging in form of curl commands should be enabled for this request.HttpRequest.setEncoding(HttpEncoding encoding) Sets the HTTP content encoding ornullfor none.HttpRequest.setFollowRedirects(boolean followRedirects) Sets whether to follow redirects automatically.HttpRequest.setHeaders(HttpHeaders headers) Sets the HTTP request headers.HttpRequest.setInterceptor(HttpExecuteInterceptor interceptor) Sets the HTTP request execute interceptor to intercept the start ofHttpRequest.execute()(before executing the HTTP request) ornullfor none.HttpRequest.setIOExceptionHandler(HttpIOExceptionHandler ioExceptionHandler) HttpRequest.setLoggingEnabled(boolean loggingEnabled) Sets whether logging should be enabled for this request.HttpRequest.setNumberOfRetries(int numRetries) Sets the number of retries that will be allowed to execute before the request will be terminated or0to not retry requests.HttpRequest.setParser(ObjectParser parser) Sets theObjectParserused to parse the response to this request ornullfor none.HttpRequest.setReadTimeout(int readTimeout) Sets the timeout in milliseconds to read data from an established connection or0for an infinite timeout.HttpRequest.setRequestMethod(String requestMethod) Sets the HTTP request method ornullfor none.HttpRequest.setResponseHeaders(HttpHeaders responseHeaders) Sets the HTTP response headers.HttpRequest.setResponseInterceptor(HttpResponseInterceptor responseInterceptor) Sets the HTTP response interceptor ornullfor none.HttpRequest.setResponseReturnRawInputStream(boolean responseReturnRawInputStream) Sets whetherHttpResponse.getContent()should return raw input stream for this request.HttpRequest.setRetryOnExecuteIOException(boolean retryOnExecuteIOException) Deprecated.(scheduled to be removed in 1.18) UseHttpRequest.setIOExceptionHandler(HttpIOExceptionHandler)instead.HttpRequest.setSleeper(Sleeper sleeper) Sets the sleeper.HttpRequest.setSuppressUserAgentSuffix(boolean suppressUserAgentSuffix) Sets whether to not add the suffixHttpRequest.USER_AGENT_SUFFIXto the User-Agent header.HttpRequest.setThrowExceptionOnExecuteError(boolean throwExceptionOnExecuteError) Sets whether to throw an exception at the end ofHttpRequest.execute()on a HTTP error code (non-2XX) after all retries and response handlers have been exhausted.HttpRequest.setUnsuccessfulResponseHandler(HttpUnsuccessfulResponseHandler unsuccessfulResponseHandler) Sets the HTTP unsuccessful (non-2XX) response handler ornullfor none.HttpRequest.setUrl(GenericUrl url) Sets the HTTP request URL.HttpRequest.setUseRawRedirectUrls(boolean useRawRedirectUrls) Sets whether to use raw redirect URLs.HttpRequest.setWriteTimeout(int writeTimeout) Sets the timeout in milliseconds to send POST/PUT data or0for an infinite timeout.Methods in com.google.api.client.http with parameters of type HttpRequestModifier and TypeMethodDescriptionstatic UrlEncodedContentUrlEncodedContent.getContent(HttpRequest request) Returns the URL-encoded content of the given HTTP request, or if none return and set as content a new instance ofUrlEncodedContent(whoseUrlEncodedContent.getData()is an implementation ofMap).booleanHttpBackOffIOExceptionHandler.handleIOException(HttpRequest request, boolean supportsRetry) Invoked when anIOExceptionis thrown during an HTTP request.booleanHttpIOExceptionHandler.handleIOException(HttpRequest request, boolean supportsRetry) Invoked when anIOExceptionis thrown during an HTTP request.booleanHttpBackOffUnsuccessfulResponseHandler.handleResponse(HttpRequest request, HttpResponse response, boolean supportsRetry) Handler that will be invoked when an abnormal response is received.booleanHttpUnsuccessfulResponseHandler.handleResponse(HttpRequest request, HttpResponse response, boolean supportsRetry) Handler that will be invoked when an abnormal response is received.voidBasicAuthentication.initialize(HttpRequest request) voidHttpRequestInitializer.initialize(HttpRequest request) Initializes a request.voidBasicAuthentication.intercept(HttpRequest request) voidHttpExecuteInterceptor.intercept(HttpRequest request) Invoked at the start ofHttpRequest.execute()before executing the HTTP request.Constructors in com.google.api.client.http with parameters of type HttpRequestModifierConstructorDescription(package private)HttpResponse(HttpRequest request, LowLevelHttpResponse response) -
Uses of HttpRequest in com.google.api.client.testing.http
Methods in com.google.api.client.testing.http with parameters of type HttpRequestModifier and TypeMethodDescriptionbooleanMockHttpUnsuccessfulResponseHandler.handleResponse(HttpRequest request, HttpResponse response, boolean supportsRetry)