def create(url):
  p_url = urlparse.urlparse(url)
  if not p_url.scheme:
    raise BurstException("The scheme is required (http:// or https://)")
  host = p_url.hostname
  if not p_url.path:
    url += "/"
  return Request("""GET {} HTTP/1.1\r
Host: {}\r
User-Agent: Mozilla/5.0 (Windows; U; MSIE 9.0; Windows NT 0.9; en-US)\r
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r
Accept-Language: en;q=0.5\r
Accept-Encoding: gzip, deflate\r
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r
\r
""".format(url, host))
Create a request on the fly, based on a URL.
dataset/ETHPy150Open tweksteen/burst/burst/http.py/create