We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how can i get web page body as string ?
The text was updated successfully, but these errors were encountered:
just like this the result would be the page body http::Request request{"http://test.com/test"};
http::Request request{"http://test.com/test"};
Sorry, something went wrong.
@venti-bit @Altman-conquer General speaking body of a webpage always exists in the HTTP response body. Check the following example:
#include <iostream> #include "HTTPRequest.hpp" int main() { try { // you can pass http::InternetProtocol::V6 to Request to make an IPv6 request http::Request request{"http://info.cern.ch/hypertext/WWW/TheProject.html"}; // send a get request const auto response = request.send("GET"); std::cout << std::string{response.body.begin(), response.body.end()} << '\n'; // print the result } catch (const std::exception& e) { std::cerr << "Request failed, error: " << e.what() << '\n'; } return 0; }
No branches or pull requests
how can i get web page body as string ?
The text was updated successfully, but these errors were encountered: