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

Method Send

libraries/lib-sentry-reporting/SentryReport.cpp:358–377  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

356
357
358void Report::ReportImpl::Send(CompletionHandler completionHandler) const
359{
360 const std::string serializedDocument = ToString(false);
361
362 network_manager::Request request =
363 SentryRequestBuilder::Get().CreateRequest();
364
365 auto response = network_manager::NetworkManager::GetInstance().doPost(
366 request, serializedDocument.data(), serializedDocument.size());
367
368 response->setRequestFinishedCallback(
369 [response, handler = std::move(completionHandler)](network_manager::IResponse*) {
370 const std::string responseData = response->readAll<std::string>();
371
372 wxLogDebug(responseData.c_str());
373
374 if (handler)
375 handler(response->getHTTPCode(), responseData);
376 });
377}
378
379std::string Report::ReportImpl::ToString(bool pretty) const
380{

Callers 2

PutMessageMethod · 0.45
OnSendMethod · 0.45

Calls 10

GetFunction · 0.85
moveFunction · 0.85
CreateRequestMethod · 0.80
doPostMethod · 0.80
ToStringFunction · 0.50
dataMethod · 0.45
sizeMethod · 0.45
c_strMethod · 0.45
getHTTPCodeMethod · 0.45

Tested by

no test coverage detected