mirror of
https://github.com/geode-sdk/geode.git
synced 2025-03-26 21:00:50 -04:00
rare hjfod L
This commit is contained in:
parent
40e2605731
commit
bb64bf8bc0
1 changed files with 5 additions and 2 deletions
|
@ -1,3 +1,5 @@
|
|||
#include "Geode/utils/general.hpp"
|
||||
#include <matjson.hpp>
|
||||
#define CURL_STATICLIB
|
||||
#include <curl/curl.h>
|
||||
#include <ca_bundle.h>
|
||||
|
@ -425,11 +427,12 @@ WebRequest& WebRequest::body(ByteVector raw) {
|
|||
return *this;
|
||||
}
|
||||
WebRequest& WebRequest::bodyString(std::string_view str) {
|
||||
m_impl->m_body = toByteArray(str);
|
||||
m_impl->m_body = ByteVector { str.begin(), str.end() };
|
||||
return *this;
|
||||
}
|
||||
WebRequest& WebRequest::bodyJSON(matjson::Value const& json) {
|
||||
this->header("Content-Type", "application/json");
|
||||
m_impl->m_body = toByteArray(json);
|
||||
std::string str = json.dump(matjson::NO_INDENTATION);
|
||||
m_impl->m_body = ByteVector { str.begin(), str.end() };
|
||||
return *this;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue