parameters: (self, url, data=None)
return_statement: return req
docstring: Creates a new urllib request.
docstring_summary: Creates a new urllib request.
docstring_tokens: Creates a new urllib request .
function: def _CreateRequest(self, url, data=None):
      """Creates a new urllib request."""
      logging.debug("Creating request for: '%s' with payload:\n%s", url, data)
      req = urllib2.Request(url, data=data, headers={"Accept": "text/plain"})
      if self.host_override:
        req.add_header("Host", self.host_override)
      for key, value in self.extra_headers.iteritems():
        req.add_header(key, value)
      return req
function_tokens: def _CreateRequest ( self , url , data = None ) : logging . debug ( "Creating request for: '%s' with payload:\n%s" , url , data ) req = urllib2 . Request ( url , data = data , headers = { "Accept" : "text/plain" } ) if self . host_override : req . add_header ( "Host" , self . host_override ) for key , value in self . extra_headers . iteritems ( ) : req . add_header ( key , value ) return req