hyper icon indicating copy to clipboard operation
hyper copied to clipboard

Authentication how-to needed

Open paul-hammant opened this issue 8 years ago • 0 comments

It is in the headers, I think, and needs to be passed with every request:

c = HTTP11Connection(ip, port)
hdrs = headers = {
    "Authorization": "Basic cCF1eDpqYXZhYzE=",
}
first = c.request('GET', url, headers=hdrs)

My initial guess was that I could pass it into the constructor of the connection

paul-hammant avatar Oct 10 '17 15:10 paul-hammant