MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / Request

Method Request

http.cpp:232–252  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

230
231
232 Request::Request(string method, string url, const unordered_map<string, string>& headers,
233 vector<pair<string, string>> params, std::function<bool(size_t, size_t)> downloadProgress,
234 std::function<bool(size_t, size_t)> uploadProgress) :
235 m_method(method),
236 m_url(url), m_headers(headers), m_downloadProgress(downloadProgress), m_uploadProgress(uploadProgress)
237 {
238 if (!params.empty())
239 {
240 m_url += "?";
241 m_url += UrlEncode(params);
242 }
243
244 if (m_headers.find("Content-Length") == m_headers.end())
245 {
246 m_headers.insert({"Content-Length", to_string(m_body.size())});
247 }
248 if (m_headers.find("Content-Type") == m_headers.end())
249 {
250 m_headers.insert({"Content-Type", "application/octet-stream"});
251 }
252 }
253
254
255 Request::Request(string method, string url, const unordered_map<string, string>& headers,

Callers

nothing calls this directly

Calls 9

UrlEncodeFunction · 0.85
copyFunction · 0.85
MultipartEncodeFunction · 0.85
findMethod · 0.80
emptyMethod · 0.45
endMethod · 0.45
insertMethod · 0.45
sizeMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected