Go to the documentation of this file.
15 #ifndef LLVM_DEBUGINFOD_HTTPCLIENT_H
16 #define LLVM_DEBUGINFOD_HTTPCLIENT_H
52 #ifdef LLVM_ENABLE_CURL
73 void setTimeout(std::chrono::milliseconds Timeout);
86 #endif // LLVM_DEBUGINFOD_HTTPCLIENT_H
A reusable client that can perform HTTPRequests through a network socket.
This is an optimization pass for GlobalISel generic memory operations.
A handler for state updates occurring while an HTTPRequest is performed.
static bool IsInitialized
static void initialize()
Must be called at the beginning of a program, while it is a single thread.
HTTPRequest(StringRef Url)
SmallVector< std::string, 0 > Headers
static void cleanup()
Must be called at the end of a program, while it is a single thread.
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
Error perform(const HTTPRequest &Request, HTTPResponseHandler &Handler)
Performs the Request, passing response data to the Handler.
virtual Error handleBodyChunk(StringRef BodyChunk)=0
Processes an additional chunk of bytes of the HTTP response body.
unsigned responseCode()
Returns the last received response code or zero if none.
static bool isAvailable()
Returns true only if LLVM has been compiled with a working HTTPClient.
void setTimeout(std::chrono::milliseconds Timeout)
Sets the timeout for the entire request, in milliseconds.
bool operator==(uint64_t V1, const APInt &V2)
StringRef - Represent a constant reference to a string, i.e.
A stateless description of an outbound HTTP request.
Lightweight error class with error context and mandatory checking.