14#ifndef LLVM_SUPPORT_HTTP_STREAMEDHTTPRESPONSEHANDLER_H
15#define LLVM_SUPPORT_HTTP_STREAMEDHTTPRESPONSEHANDLER_H
28 using CreateStreamFn =
29 std::function<Expected<std::unique_ptr<CachedFileStream>>()>;
30 CreateStreamFn CreateStream;
32 std::unique_ptr<CachedFileStream> FileStream;
36 : CreateStream(
std::
move(CreateStream)), Client(Client) {}
This file contains the declarations of the HTTPClient library for issuing HTTP requests and handling ...
Lightweight error class with error context and mandatory checking.
A reusable client that can perform HTTPRequests through a network socket.
A handler for state updates occurring while an HTTPRequest is performed.
virtual ~StreamedHTTPResponseHandler()=default
StreamedHTTPResponseHandler(CreateStreamFn CreateStream, HTTPClient &Client)
Error commit()
Must be called exactly once after the writes have been completed but before the StreamedHTTPResponseH...
Error handleBodyChunk(StringRef BodyChunk) override
Processes an additional chunk of bytes of the HTTP response body.
StringRef - Represent a constant reference to a string, i.e.
This is an optimization pass for GlobalISel generic memory operations.
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Implement std::hash so that hash_code can be used in STL containers.