[asio] std::ostream request_stream

Good morning, In the examples that illustrate the use of Boost.Asio in more complex applications, there is the "boost_asio/example/http/client/sync_client.cpp" example. In this example, the following code is written : boost::asio::streambuf request; std::ostream request_stream(&request); request_stream << "GET " << argv[2] << " HTTP/1.0\r\n"; request_stream << "Host: " << argv[1] << "\r\n"; request_stream << "Accept: */*\r\n"; request_stream << "Connection: close\r\n\r\n"; I would like to use the POST method with parameters instead of GET method, and to set the "Content-Type" property. But I do not how to do. Could you tell me more about using the POST method and setting the "Content-Type" property ? Could you also tell me where I can find documentation about it ? Thank you for your response, Regards. ____________________________________________________ Sur le mail Voila, vous pouvez personnaliser l’anti-spam ! http://mail.voila.fr
participants (1)
-
simonvifr@voila.fr