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

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.

Related

How to implement Restful Webservice using C++

Are there any helpful c++ libraries which can support me, implementing a simple REST webservice?
I am not searching for a bloated webservice framework like c++ REST SDK, or something like that. I already have a HTTP server running which can handle HTTP calls. (especially the HTTP server from the poco libraries).
I guess it should be not too hard to implement a Restful webservice interface around that.
But my question is, do i have to implement it on my own (how would you implement it?) or can I still make use of some libraries? So I am searchin for a library that can actually help me processing rest requests.
kind regards

C++ Library with http 1.1 response caching support

I am working on a project where I need to communicate with a server using a network library in C++. Currently im using POCO/Net
Is there any C++ library that has support for response caching, authentication, HTTP and HTTPS similar to the Java version?
Greatful for help!
wwwlib seems to provide the kind of persistant cache you are after and is http 1.1 compliant according to W3lib. I have not yet tried it though, it seems very low level in comparison to POCO. Someone else might have a simpler library...

clojure library for SPNEGO/Kerberos-http authentication

I understand this is a long shot but, would there happen to be a clojure library for responding to kerberos over http (aka spnego) requests?
I'm currently looking into using spring-security framework for this but thought i'd ask about a more clojure friendly approach just in case.
There's nothing special involved to integrate a clojure app with Spring Security. However, you are bound by its implementation as a servlet filter, so you cannot easily use it under a generic http library. Under a j2ee container, it is a good choice.

How i can send an HttpRequest from C++

I'm using DataServices and OData protocol. I need to generate HTTP Get, Post, Delete, and Update from a C++ application. How I can do this? What is the easiest way?
Try cURL. check out this SO post. Perform a simple HTTP request using C++ / Boost via a proxy?
Boost.Asio. There's an example of a simple HTTP client (with a GET request).
The POCO library is another alternative to cURL
You can use MS stuff: Wininet or WinHTTP.
Adding to this old post.
Beast is a cross-platform, header-only, modern C++11 library built on Boost.Asio that provides implementations of the HTTP and WebSocket protocols.
The project is under evaluation to be included in Boost, so it may be worth looking at it.

Problems with home-brew web crawler

I have built a webcrawler in C++. I am using an API called URLdownloadToFile().
Is there any other API that can be used?
The API URLdownloadToFile() is working well for some URLs and it is not working well for some other URLs? Please suggest some ways I can overcome this problem?
Thanks,
Dnyaneshwari C.
You might want to look into libcurl which should allow you to pull content using a variety of protocols. This should also support proxies etc which might be what is giving you problems with specific urls. See also; http://curl.haxx.se/
You might want to look at WinINet which is a simple C API for high-level interface with the HTTP network stack. Another option is WinHttp which is somewhat more compilcated and requires you do deal with COM.
Unless there is a particular reason for sticking with c++ you could well be better off switching to Python and using BeautifulSoup. I've used curl, and it is nice, but all my web stuff is done in Python now