Here are the examples of the python api acurl_ng.Request taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
3
Source : helpers_ng.py
with MIT License
from sky-uk
with MIT License
from sky-uk
def create_request(
method,
url,
headers=(),
cookies=(),
auth=None,
data=None,
cert=None,
):
# Cookies should be the byte string representation of the cookie
if isinstance(method, str):
method = method.encode()
headers = tuple(h.encode("utf-8") if hasattr(h, "encode") else h for h in headers)
return acurl_ng.Request(method, url, headers, cookies, auth, data, cert)