MCPcopy Create free account
hub / github.com/Norbyte/ositools / FetchETag

Method FetchETag

OsiLoader/HttpFetcher.cpp:38–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38bool HttpFetcher::FetchETag(wchar_t const * path, std::string & etag)
39{
40 auto request = WinHttpOpenRequest(httpSession_, L"HEAD", path, NULL,
41 WINHTTP_NO_REFERER, WINHTTP_DEFAULT_ACCEPT_TYPES, WINHTTP_FLAG_SECURE);
42 if (request == NULL) return false;
43
44 bool result = false;
45 if (SendRequest(request, path)) {
46 result = FetchETag(request, etag);
47 }
48
49 WinHttpCloseHandle(request);
50 return result;
51}
52
53bool HttpFetcher::SendRequest(HINTERNET request, wchar_t const * path)
54{

Callers 1

TryToUpdateMethod · 0.80

Calls 1

ToUTF8Function · 0.85

Tested by

no test coverage detected