correct http method.
This commit is contained in:
parent
e81337c3aa
commit
88bc6c11a1
@ -135,7 +135,7 @@ void Client::loadRootCertificates(boost::system::error_code &error) {
|
|||||||
std::string Client::get(const std::string &host, const std::string &port, const std::string &url,
|
std::string Client::get(const std::string &host, const std::string &port, const std::string &url,
|
||||||
boost::system::error_code &error) {
|
boost::system::error_code &error) {
|
||||||
using namespace boost::beast;
|
using namespace boost::beast;
|
||||||
m_request.method(http::verb::put);
|
m_request.method(http::verb::get);
|
||||||
m_request.target(url);
|
m_request.target(url);
|
||||||
m_request.set(http::field::host, host);
|
m_request.set(http::field::host, host);
|
||||||
return execute(host, port, m_request, error);
|
return execute(host, port, m_request, error);
|
||||||
@ -144,7 +144,7 @@ std::string Client::get(const std::string &host, const std::string &port, const
|
|||||||
std::string Client::post(const std::string &host, const std::string &port, const std::string &url,
|
std::string Client::post(const std::string &host, const std::string &port, const std::string &url,
|
||||||
const std::string &body, boost::system::error_code &error) {
|
const std::string &body, boost::system::error_code &error) {
|
||||||
using namespace boost::beast;
|
using namespace boost::beast;
|
||||||
m_request.method(http::verb::put);
|
m_request.method(http::verb::post);
|
||||||
m_request.target(url);
|
m_request.target(url);
|
||||||
m_request.set(http::field::host, host);
|
m_request.set(http::field::host, host);
|
||||||
m_request.body() = body;
|
m_request.body() = body;
|
||||||
|
Loading…
Reference in New Issue
Block a user