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

Method construct_http_get

main/interface/network/RequestObject.cpp:121–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119 }
120
121 RequestObject RequestObject::construct_http_get(
122 const std::string& url, const std::function<void(const std::vector<char>&, CURL*)>& callback,
123 const std::vector<std::string>& headers, const int& timeout_s,
124 const std::function<int(curl_off_t, curl_off_t, curl_off_t, curl_off_t)>& progress_callback) {
125 RequestObject request;
126 request.method = Method::GET;
127 request.url = url;
128 request.callback = callback;
129 request.headers = headers;
130 request.timeout_s = timeout_s;
131 request.progress = progress_callback;
132 return request;
133 }
134
135 RequestObject RequestObject::construct_http_post(
136 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