OK, these old proxy techniques use the HTTP CONNECT verb. The request line is supposed to be CONNECT myHost:myPort HTTP/1.1 (or 1.0). The thing is that myHost:myPort is not a URL. It is a URI, though. But you have to initiallize a URLRequest with a URL. (I tried with URLComponents and defining just the host and port, and I got //myHost:myPort. The extra slahses at the start make it useless here, unless you know some form of CONNECT-URI that allows slash prefixes.)Is there another type of proxy that lets you put full URLs on the CONNECT line? Or doesn't use CONNECT at all? I want to know what kind of proxy connections the authors at Apple (at least the ones at WWDC 2015) had in mind when designing the data-request-to-stream-task conversion delegate method.If I can't customize URLRequest the way I need, then I have to resort to the CFHTTPMessage API (or straight up manual work).
Topic:
App & System Services
SubTopic:
Networking
Tags: