简体   繁体   中英

Perform a simple HTTP request using C++ / Boost via a proxy?

I'm quite a newbie with Boost, and my only experience of surfing though a proxy using a library is using .NET (that is really convenient for that purpose). I'm now trying to perform a simple HTTP request through a HTTP proxy.

Is there a tidy way to do it using boost directly?

My proxy use a NTLM authentification.

No, Boost provides neither an HTTP client nor a way to interface with proxies. You would necessarily have to implement those features yourself.

To be clear, yes, it is possible to implement an HTTP client using Boost.Asio. But implementing a client that can reliably talk through a proxy is significantly more complex, and Asio does not provide any support for that beyond the low-level socket itself. It certainly does not include the framework for performing NTLM authentication, which may prove difficult to get right.

More complex libraries like cURL provide that support.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM