MCPcopy Create free account
hub / github.com/audacity/audacity / GetResponseResult

Function GetResponseResult

libraries/lib-cloud-audiocom/NetworkUtils.cpp:93–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91} // namespace
92
93ResponseResult GetResponseResult(IResponse& response, bool readBody)
94{
95 const auto resultCode = GuessResultCode(response);
96
97 if (resultCode == SyncResultCode::Success)
98 return { resultCode,
99 readBody ? response.readAll<std::string>() : std::string {} };
100
101 if (response.getError() != NetworkError::HTTPError)
102 return { resultCode, response.getErrorString() };
103
104 return { resultCode,
105 std::string("HTTP ") + std::to_string(response.getHTTPCode()) +
106 std::string("\n") + response.readAll<std::string>() };
107}
108
109void SetCommonHeaders(Request& request)
110{

Callers 8

PerformProjectGetRequestFunction · 0.85
GetProjectsMethod · 0.85
GetAudioInfoFunction · 0.85
GetAudioListMethod · 0.85
DownloadBlobMethod · 0.85
PerformUploadMethod · 0.85
ConfirmUploadMethod · 0.85
FailUploadMethod · 0.85

Calls 5

GuessResultCodeFunction · 0.85
to_stringFunction · 0.85
getErrorMethod · 0.45
getErrorStringMethod · 0.45
getHTTPCodeMethod · 0.45

Tested by

no test coverage detected