Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 757
TigrouMeow Avatar asked Sep 16 '09 01:09

TigrouMeow


1 Answers

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.

like image 57
greyfade Avatar answered Nov 17 '22 17:11

greyfade