MCPcopy Create free account
hub / github.com/LagPixelLOL/ChatGPTCLIBot / construct_http_post

Method construct_http_post

main/interface/network/RequestObject.cpp:135–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133 }
134
135 RequestObject RequestObject::construct_http_post(
136 const std::string& url, const std::function<void(const std::vector<char>&, CURL*)>& callback,
137 const std::string& post_data, const std::vector<std::string>& headers, const int& timeout_s,
138 const std::function<int(curl_off_t, curl_off_t, curl_off_t, curl_off_t)>& progress_callback) {
139 RequestObject request;
140 request.method = Method::POST;
141 request.url = url;
142 request.callback = callback;
143 request.post_data = post_data;
144 request.headers = headers;
145 request.timeout_s = timeout_s;
146 request.progress = progress_callback;
147 return request;
148 }
149
150 RequestObject RequestObject::construct_http_delete(
151 const std::string& url, const std::function<void(const std::vector<char>&, CURL*)>& callback,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected