'Constructor for an HttpRequest.
Args:
http: httplib2.Http, the transport object to use to make a request
postproc: callable, called on the HTTP response and content to transform
it into a data object before returning, or raising an exception
on an error.
uri: string, the absolute URI to send the request to
method: string, the HTTP method to use
body: string, the request body of the HTTP request,
headers: dict, the HTTP request headers
methodId: string, a unique identifier for the API method being called.
resumable: MediaUpload, None if this is not a resumbale request.'

@util.positional(4)
def __init__(self, http, postproc, uri, method='GET', body=None, headers=None, methodId=None, resumable=None):

    self.uri = uri
    self.method = method
    self.body = body
    self.headers = (headers or {})
    self.methodId = methodId
    self.http = http
    self.postproc = postproc
    self.resumable = resumable
    self.response_callbacks = []
    self._in_error_state = False
    (major, minor, params) = mimeparse.parse_mime_type(self.headers.get('content-type', 'application/json'))
    self.body_size = len((self.body or ''))
    self.resumable_uri = None
    self.resumable_progress = 0
    self._rand = random.random
    self._sleep = time.sleep
