HTTP Proxy Support in Google API Client Library for C++ - c++

Does Google API Client Library for C++ have support for HTTP Proxy? The use case examples for sending HTTP POST request at http://google.github.io/google-api-cpp-client/latest/guide/making_http_requests.html do not mention anything about HTTP Proxy Support. Does it have dependencies on external libraries like libcurl or libjingle for HTTP Proxy?
Thanks

Related

Does libtorrent support http web seed with digest authentication?

I implement a bittorrent client using libtorrent. but I meet a problem. I have a http file server as the web seed. The server just support digest authentication for http request. and Libtorrent support basic auth by default. Does it have any way to make libtorrent to support digest auth? It would be nice to give an example. Thanks in advance.
no, libtorrent does not support digest authentication for HTTP seeds.
Patches are welcome! (and really, web servers and HTTP trackers should really be transitioned to use boost.beast instead of a homegrown HTTP parser)

Does a SOAP client need to run on a web service?

I'm new to SOAP.
I would like to understand if a SOAP client can run without a webserver ( like only JavaSE with JAXB lib ) or not
HTTP clients make requests to HTTP servers.
They only need to part of an HTTP server if their user interface is also designed to be accessed over HTTP.

Google API Client Library for C++ vs libcurl for sending HTTP request?

After installing google-api-client library for C++ on a Fedora 20 machine, I find out that it has external dependencies on libcurl (for example, setting up http proxy). I was planning to use google-api-client for sending HTTP request, mainly, HTTP multipart POST request. However, libcurl does provide support for multipart HTTP POST request also.
Could someone let me know the advantages of using Google API Client library for C++ over libcurl in order to send HTTP request?
Any suggestions/recommendations would be highly appreciated.
Thanks
The Google API Client Library is just a C++ wrapper around libcurl which is pure C library. I would use Casablanca REST SDK which is written in modern C++11, has no external dependencies and is cross platform.

Implementing a Client using Mongoose with C++

I know how to implement a server with Mongoose, in fact all information that I could find was about servers, but I need to know how do I implement a client.
Very basic, how to connect to a server is the main problem, the send functions are pretty straight forward.
Mongoose is a web server and AFAIK does not provide an API for client side http requests.
For C++ http client libraries, you might want to look at these answers:
What C++ library should I use to implement a HTTP client?
A better C++ HTTP client library
These sites also give a good overview about available C++ client libraries:
http://curl.haxx.se/libcurl/competitors.html
http://en.cppreference.com/w/cpp/links/libs
Mongoose actually does provide HTTP client functionality. See mg_connect() on http://cesanta.com/docs/API.shtml. Also, example HTTP client code is at https://github.com/cesanta/mongoose/tree/master/examples/http_client
I suggest using Fossa library (a superset of Mongoose), as it's HTTP client interface is more flexible. Example code is at https://github.com/cesanta/fossa/tree/master/examples/restful_client , documentation is at http://cesanta.com/docs/fossa/

Windows C++ Should I use WinHttp library or XmlHttp from MSXML?

A rather simple question. Should I use the WinHttp library to make a web service request in my C++ programs or should I use the IXmlHttpRequest interface in the msxml library to send web service requests? Obviously the WinHttp library provides a lot more fine control compared to the IXmlHttpRequest library. But the XmlHttpRequest object is a w3.org standard and in theory more portable.
It depends whether you are accessing the service on secure channel i.e. HTTPS or simple one i.e. HTTP.
As per MSDN (http://msdn.microsoft.com/en-us/library/ms891732.aspx), IXMLHttpRequest supports only HTTP.
Note IXMLHTTPRequest does not support secure website access. To access a secure website, use the WinINet API.
But WinInet API is quite old and have some multi-threading issues (I think its there on MSDN too)...
So the best bet is WinHTTP for HTTPS and HTTP, otherwise good old IXMLHttpRequest.
Note: libcurl and curlpp (c++ port of libcurl) is also there to check. There is an old post for this http://stackoverflow.com/questions/1011339/how-do-you-make-a-http-request-with-c
Simple answer to your "simple question": You should use what you feel most comfortable in and what best fits to your requirements.
You could also consider the http client in boost::asio.