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

Method OnFinish

libs/platform/http_request.cpp:73–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71 }
72
73 virtual void OnFinish(long httpOrErrorCode, int64_t, int64_t)
74 {
75 if (httpOrErrorCode == 200)
76 {
77 m_status = DownloadStatus::Completed;
78 }
79 else
80 {
81 auto const message = non_http_error_code::DebugPrint(httpOrErrorCode);
82 LOG(LWARNING, ("HttpRequest error:", message));
83 if (httpOrErrorCode == 404)
84 m_status = DownloadStatus::FileNotFound;
85 else
86 m_status = DownloadStatus::Failed;
87 }
88
89 m_onFinish(*this);
90 }
91
92public:
93 MemoryHttpRequest(string const & url, Callback && onFinish, Callback && onProgress)

Callers

nothing calls this directly

Calls 1

DebugPrintFunction · 0.70

Tested by

no test coverage detected