com.google.api.client.googleapis
Class GoogleTransport

java.lang.Object
  extended by com.google.api.client.http.HttpTransport
      extended by com.google.api.client.googleapis.GoogleTransport

public class GoogleTransport
extends HttpTransport

HTTP transport for Google API's. It's only purpose is to allow for method overriding when the firewall does not accept DELETE, PATCH or PUT methods.

Warning: scheduled in version 1.1 to no longer extend HttpTransport

Since:
1.0
Author:
Yaniv Inbar

Field Summary
 String applicationName
          Deprecated. (scheduled to be removed in version 1.1) Use GoogleHeaders.setApplicationName(String) on HttpTransport.defaultHeaders
static boolean ENABLE_METHOD_OVERRIDE
          Deprecated. (scheduled to be removed in version 1.1) Use create()
 
Fields inherited from class com.google.api.client.http.HttpTransport
defaultHeaders, intercepters
 
Constructor Summary
GoogleTransport()
          Deprecated. (scheduled to be removed in version 1.1) Use create()
 
Method Summary
 HttpRequest buildDeleteRequest()
          Builds a DELETE request.
 HttpRequest buildPatchRequest()
          Builds a PATCH request.
 HttpRequest buildPutRequest()
          Builds a PUT request.
static HttpTransport create()
          Creates and returns a new HTTP transport with basic default behaviors for working with Google API's.
static String getClientLoginHeaderValue(String authToken)
          Deprecated. (scheduled to be removed in version 1.1) Use GoogleHeaders.getGoogleLoginValue(String)
 void setClientLoginToken(String authToken)
          Deprecated. (scheduled to be removed in version 1.1) Use GoogleHeaders.setGoogleLogin(String)
 void setVersionHeader(String version)
          Deprecated. (scheduled to be removed in version 1.1) Use GoogleHeaders.gdataVersion on HttpTransport.defaultHeaders
 
Methods inherited from class com.google.api.client.http.HttpTransport
addParser, buildGetRequest, buildHeadRequest, buildPostRequest, buildRequest, getParser, removeIntercepters, setLowLevelHttpTransport, useLowLevelHttpTransport
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENABLE_METHOD_OVERRIDE

@Deprecated
public static boolean ENABLE_METHOD_OVERRIDE
Deprecated. (scheduled to be removed in version 1.1) Use create()
If true, the GData HTTP client library will use POST to send data to the associated GData service and will specify the actual method using the method override HTTP header. This can be used as a workaround for HTTP proxies or gateways that do not handle PUT, PATCH, or DELETE HTTP methods properly. If false, the regular verbs will be used.


applicationName

@Deprecated
public String applicationName
Deprecated. (scheduled to be removed in version 1.1) Use GoogleHeaders.setApplicationName(String) on HttpTransport.defaultHeaders
Required application name of the format "[company-id]-[app-name]-[app-version]".

Constructor Detail

GoogleTransport

@Deprecated
public GoogleTransport()
Deprecated. (scheduled to be removed in version 1.1) Use create()

Method Detail

create

public static HttpTransport create()
Creates and returns a new HTTP transport with basic default behaviors for working with Google API's.

Includes:

Sample usage:

 static HttpTransport createTransport() {
   HttpTransport transport = GoogleHeaders.create();
   GoogleHeaders headers = (GoogleHeaders) transport.defaultHeaders;
   headers.setApplicationName("acme-rocket-2");
   headers.gdataVersion = "2";
 }
 
 

Returns:
HTTP transport

setVersionHeader

@Deprecated
public void setVersionHeader(String version)
Deprecated. (scheduled to be removed in version 1.1) Use GoogleHeaders.gdataVersion on HttpTransport.defaultHeaders

Sets the "GData-Version" header required by Google Data API's.

Parameters:
version - version of the Google Data API being access, for example "2".

setClientLoginToken

@Deprecated
public void setClientLoginToken(String authToken)
Deprecated. (scheduled to be removed in version 1.1) Use GoogleHeaders.setGoogleLogin(String)

Sets the Client Login token (implemented as a GoogleLogin Authorization header) based on the given authentication token. This is primarily intended for use in the Android environment after retrieving the authentication token from the AccountManager.


getClientLoginHeaderValue

@Deprecated
public static String getClientLoginHeaderValue(String authToken)
Deprecated. (scheduled to be removed in version 1.1) Use GoogleHeaders.getGoogleLoginValue(String)

Returns Client Login authentication header value based on the given authentication token.


buildDeleteRequest

public HttpRequest buildDeleteRequest()
Description copied from class: HttpTransport
Builds a DELETE request.

Overrides:
buildDeleteRequest in class HttpTransport

buildPatchRequest

public HttpRequest buildPatchRequest()
Description copied from class: HttpTransport
Builds a PATCH request.

Overrides:
buildPatchRequest in class HttpTransport

buildPutRequest

public HttpRequest buildPutRequest()
Description copied from class: HttpTransport
Builds a PUT request.

Overrides:
buildPutRequest in class HttpTransport


Copyright © 2010 Google. All Rights Reserved.