I am trying to write a client that can execute both HTTP and HTTPS requests depending on how it is configured. For regular HTTP, I used twisted.web.client.Agent and used agent.request (METHOD, HOST, HEADERS, CONTENT) to execute the requests. I am interested in that this is the host field, when I do HTTP, it works by doing something like " http: // localhost: 8000 ", but if I switch to HTTPS, I get the error message:
Crash: twisted.web.error.SchemeNotSupported: Unsupported scheme: 'https'
I know about the existence of the client.getPage method, but I was wondering if there are any similar awesome and high level methods that I can do with queries, like with agent.request, but using HTTPS?
source
share