App Engine Python SDK  v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
Public Member Functions | Public Attributes | List of all members
google.appengine.tools.appengine_rpc_httplib2.HttpRpcServerHttpLib2 Class Reference
Inheritance diagram for google.appengine.tools.appengine_rpc_httplib2.HttpRpcServerHttpLib2:
google.appengine.tools.appengine_rpc_httplib2.HttpRpcServerOAuth2

Public Member Functions

def __init__
 
def Send
 

Public Attributes

 host
 
 auth_function
 
 user_agent
 
 source
 
 host_override
 
 extra_headers
 
 save_cookies
 
 auth_tries
 
 account_type
 
 debug_data
 
 secure
 
 ignore_certs
 
 rpc_tries
 
 scheme
 
 certpath
 
 cert_file_available
 
 memory_cache
 
 http
 

Detailed Description

A variant of HttpRpcServer which uses httplib2.

This follows the same interface as appengine_rpc.AbstractRpcServer,
but is a totally separate implementation.

Constructor & Destructor Documentation

def google.appengine.tools.appengine_rpc_httplib2.HttpRpcServerHttpLib2.__init__ (   self,
  host,
  auth_function,
  user_agent,
  source,
  host_override = None,
  extra_headers = None,
  save_cookies = False,
  auth_tries = None,
  account_type = None,
  debug_data = True,
  secure = True,
  ignore_certs = False,
  rpc_tries = 3 
)
Creates a new HttpRpcServerHttpLib2.

Args:
  host: The host to send requests to.
  auth_function: Saved but ignored; may be used by subclasses.
  user_agent: The user-agent string to send to the server. Specify None to
omit the user-agent header.
  source: Saved but ignored; may be used by subclasses.
  host_override: The host header to send to the server (defaults to host).
  extra_headers: A dict of extra headers to append to every request. Values
supplied here will override other default headers that are supplied.
  save_cookies: Saved but ignored; may be used by subclasses.
  auth_tries: The number of times to attempt auth_function before failing.
  account_type: Saved but ignored; may be used by subclasses.
  debug_data: Whether debugging output should include data contents.
  secure: If the requests sent using Send should be sent over HTTPS.
  ignore_certs: If the certificate mismatches should be ignored.
  rpc_tries: The number of rpc retries upon http server error (i.e.
Response code >= 500 and < 600) before failing.

Member Function Documentation

def google.appengine.tools.appengine_rpc_httplib2.HttpRpcServerHttpLib2.Send (   self,
  request_path,
  payload = '',
  content_type = 'application/octet-stream',
  timeout = None,
  kwargs 
)
Sends an RPC and returns the response.

Args:
  request_path: The path to send the request to, eg /api/appversion/create.
  payload: The body of the request, or None to send an empty request.
  content_type: The Content-Type header to use.
  timeout: timeout in seconds; default None i.e. no timeout.
(Note: for large requests on OS X, the timeout doesn't work right.)
  Any keyword arguments are converted into query string parameters.

Returns:
  The response body, as a string.

Raises:
  AuthPermanentFail: If authorization failed in a permanent way.
  urllib2.HTTPError: On most HTTP errors.

The documentation for this class was generated from the following file: