I've been using Boost.Beast for awhile now to send HTTP requests and I think it's great and works perfectly. But does anyone know if it's possible to construct an HTTP batch request using Beast? I'm thinking something like creating several subrequests:
boost::beast::http::request<boost::beast::http::string_body> subrequest_1;
subrequest_1.set(boost::beast::http::field::content_type, "application/http");
...
boost::beast::http::request<boost::beast::http::string_body> subrequest_2;
subrequest_2.set(boost::beast::http::field::content_type, "application/http");
...
and then somehow group them together and send them all in one request.
I've been trying to create a vector, add the subrequests to it and then assign the vector to the body of the request I'd like to send, but that hasn't been successful.
/*
std::vector<boost::beast::http::request<boost::beast::http::string_body>> v;
v.push_back(subrequest_1);
v.push_back(subrequest_2);
boost::beast::http::request<boost::beast::http::string_body> request;
request.method(boost::beast::http::verb::post);
...
request.body() = v;
*/
Thanks in advance!