MCPcopy Create free account
hub / github.com/comaps/comaps / RunHttpRequest

Method RunHttpRequest

libs/platform/http_client.cpp:13–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11HttpClient::HttpClient(string const & url) : m_urlRequested(url) {}
12
13bool HttpClient::RunHttpRequest(string & response, SuccessChecker checker /* = nullptr */)
14{
15 static auto const simpleChecker = [](HttpClient const & request) { return request.ErrorCode() == 200; };
16
17 if (checker == nullptr)
18 checker = simpleChecker;
19
20 if (RunHttpRequest() && checker(*this))
21 {
22 response = ServerResponse();
23 return true;
24 }
25
26 return false;
27}
28
29HttpClient & HttpClient::SetUrlRequested(string const & url)
30{

Callers 15

LoadMetaConfigMethod · 0.45
DoPingFunction · 0.45
LoadFunction · 0.45
ReadRemoteFileFunction · 0.45
ReceiveTrafficValuesMethod · 0.45
FetchSessionIdMethod · 0.45
LogoutUserMethod · 0.45
LoginUserPasswordMethod · 0.45
LoginSocialMethod · 0.45
SendAuthRequestMethod · 0.45
FetchRequestTokenMethod · 0.45
FinishAuthorizationMethod · 0.45

Calls 1

ErrorCodeMethod · 0.80

Tested by

no test coverage detected