Lines Matching refs:httplib2
12 import httplib2
29 c = httplib2.Credentials()
50 httplib2.parse_uri("http://example.com"),
54 httplib2.parse_uri("https://example.com"),
58 httplib2.parse_uri("https://example.com:8080"),
62 httplib2.parse_uri("http://example.com/"),
66 httplib2.parse_uri("http://example.com/path"),
70 httplib2.parse_uri("http://example.com/path?a=1&b=2"),
74 httplib2.parse_uri("http://example.com/path?a=1&b=2#fred"),
78 httplib2.parse_uri("http://example.com/path?a=1&b=2#fred"),
85 "http://example.org/", httplib2.urlnorm("http://example.org")[-1]
88 "http://example.org/", httplib2.urlnorm("http://EXAMple.org")[-1]
91 "http://example.org/?=b", httplib2.urlnorm("http://EXAMple.org?=b")[-1]
95 httplib2.urlnorm("http://EXAMple.org/mypath?a=b")[-1],
98 "http://localhost:80/", httplib2.urlnorm("http://localhost:80")[-1]
101 httplib2.urlnorm("http://localhost:80/"),
102 httplib2.urlnorm("HTTP://LOCALHOST:80"),
105 httplib2.urlnorm("/")
107 except httplib2.RelativeURIError:
116 httplib2.safename("http://example.org/fred/?a=b"),
120 httplib2.safename("http://example.org/fred?/a=b"),
124 httplib2.safename("http://www.example.org/fred?/a=b"),
127 httplib2.safename(httplib2.urlnorm("http://www")[-1]),
128 httplib2.safename(httplib2.urlnorm("http://WWW")[-1]),
132 httplib2.safename("https://www.example.org/fred?/a=b"),
135 httplib2.safename("http://www"), httplib2.safename("https://www")
140 self.assertNotEqual(httplib2.safename(uri2), httplib2.safename(uri))
142 self.assertEqual(233, len(httplib2.safename(uri2)))
143 self.assertEqual(233, len(httplib2.safename(uri)))
148 httplib2.safename("http://\u2304.org/fred/?a=b"),
246 self.http = httplib2.Http(cacheDirName)
276 old_retries = httplib2.RETRIES
277 httplib2.RETRIES = 1
285 httplib2.RETRIES = old_retries
294 except httplib2.ServerNotFoundError:
356 http = httplib2.Http()
386 http = httplib2.Http()
521 except httplib2.RedirectLimit:
544 except httplib2.RedirectMissingLocation:
583 http = httplib2.Http(timeout=2)
601 except httplib2.ServerNotFoundError:
615 http = httplib2.Http(ca_certs="/nosuchfile")
623 os.path.dirname(os.path.abspath(httplib2.__file__)),
627 http = httplib2.Http(ca_certs=other_ca_certs)
683 cacheDirName, httplib2.safename(httplib2.urlnorm(uri)[-1])
948 except httplib2.FailedToDecompressContent:
962 http = httplib2.Http(timeout=1)
989 except httplib2.FailedToDecompressContent:
1286 info = httplib2._parse_www_authenticate(response, "authentication-info")
1291 info2 = httplib2._parse_www_authenticate(response, "authentication-info")
1304 info = httplib2._parse_www_authenticate(response, "authentication-info")
1315 info3 = httplib2._parse_www_authenticate(response, "authentication-info")
1389 self.http = httplib2.Http(self.cache)
1409 self.assertEqual({}, httplib2._parse_cache_control({}))
1412 httplib2._parse_cache_control({"cache-control": " no-cache"}),
1414 cc = httplib2._parse_cache_control(
1419 cc = httplib2._parse_cache_control({"cache-control": " , "})
1423 cc = httplib2._parse_cache_control(
1432 h = httplib2._normalize_headers({"Cache-Control": "no-cache", "Other": "Stuff"})
1439 httplib2._convert_byte_str(4)
1440 self.assertEqual("Hello World", httplib2._convert_byte_str(b"Hello World"))
1441 self.assertEqual("Bye World", httplib2._convert_byte_str("Bye World"))
1449 httplib2._entry_disposition(response_headers, request_headers),
1457 "STALE", httplib2._entry_disposition(response_headers, request_headers)
1471 "STALE", httplib2._entry_disposition(response_headers, request_headers)
1478 httplib2._entry_disposition({}, {"cache-control": "must-revalidate"}),
1485 httplib2._entry_disposition({"cache-control": "must-revalidate"}, {}),
1495 "FRESH", httplib2._entry_disposition(response_headers, request_headers)
1499 "STALE", httplib2._entry_disposition(response_headers, request_headers)
1509 "STALE", httplib2._entry_disposition(response_headers, request_headers)
1520 "FRESH", httplib2._entry_disposition(response_headers, request_headers)
1524 "STALE", httplib2._entry_disposition(response_headers, request_headers)
1535 "STALE", httplib2._entry_disposition(response_headers, request_headers)
1545 "STALE", httplib2._entry_disposition(response_headers, request_headers)
1552 "FRESH", httplib2._entry_disposition(response_headers, request_headers)
1563 "STALE", httplib2._entry_disposition(response_headers, request_headers)
1574 "STALE", httplib2._entry_disposition(response_headers, request_headers)
1585 "FRESH", httplib2._entry_disposition(response_headers, request_headers)
1589 res = httplib2._parse_www_authenticate({})
1594 res = httplib2._parse_www_authenticate(
1603 res = httplib2._parse_www_authenticate(
1610 res = httplib2._parse_www_authenticate(
1617 httplib2.USE_WWW_AUTH_STRICT_PARSING = 1
1619 httplib2.USE_WWW_AUTH_STRICT_PARSING = 0
1622 res = httplib2._parse_www_authenticate({"www-authenticate": 'Basic realm="me"'})
1626 res = httplib2._parse_www_authenticate(
1633 res = httplib2._parse_www_authenticate(
1641 res = httplib2._parse_www_authenticate(
1649 res = httplib2._parse_www_authenticate(
1656 res = httplib2._parse_www_authenticate(
1666 res = httplib2._parse_www_authenticate(
1682 res = httplib2._parse_www_authenticate(
1698 res = httplib2._parse_www_authenticate(
1715 res = httplib2._parse_www_authenticate(
1726 res = httplib2._parse_www_authenticate(
1736 res = httplib2._parse_www_authenticate(
1742 except httplib2.MalformedHeader:
1757 d = httplib2.DigestAuthentication(
1783 d = httplib2.DigestAuthentication(
1803 response = httplib2.Response({})
1811 d = httplib2.DigestAuthentication(
1822 response = httplib2.Response({})
1830 d = httplib2.DigestAuthentication(
1839 digest = httplib2._wsse_username_token(
1848 end2end = httplib2._get_end2end_headers(response)
1859 end2end = httplib2._get_end2end_headers(response)
1866 end2end = httplib2._get_end2end_headers(response)
1871 end2end = httplib2._get_end2end_headers(response)
1884 pi = httplib2.proxy_info_from_url("http://myproxy.example.com")
1890 pi = httplib2.proxy_info_from_url("http://zoidberg:fish@someproxy:99")
1898 pi = httplib2.proxy_info_from_environment()
1905 pi = httplib2.proxy_info_from_environment("https")
1911 pi = httplib2.proxy_info_from_environment()
1916 pi = httplib2.ProxyInfo(
1917 httplib2.socks.PROXY_TYPE_HTTP, "localhost", 1234, proxy_headers=headers
1923 connection = httplib2.HTTPConnectionWithTimeout("www.google.com", 80)