class HTTPClient

Declaration

class HTTPClient { /* full declaration omitted */ };

Description

A reusable client that can perform HTTPRequests through a network socket.

Declared at: llvm/include/llvm/Debuginfod/HTTPClient.h:50

Member Variables

public static bool IsInitialized

Method Overview

Methods

HTTPClient()

Declared at: llvm/include/llvm/Debuginfod/HTTPClient.h:56

static void cleanup()

Description

Must be called at the end of a program, while it is a single thread.

Declared at: llvm/include/llvm/Debuginfod/HTTPClient.h:68

static void initialize()

Description

Must be called at the beginning of a program, while it is a single thread.

Declared at: llvm/include/llvm/Debuginfod/HTTPClient.h:65

static bool isAvailable()

Description

Returns true only if LLVM has been compiled with a working HTTPClient.

Declared at: llvm/include/llvm/Debuginfod/HTTPClient.h:62

llvm::Error perform(
    const llvm::HTTPRequest& Request,
    llvm::HTTPResponseHandler& Handler)

Description

Performs the Request, passing response data to the Handler. Returns all errors which occur during the request. Aborts if an error is returned by a Handler method.

Declared at: llvm/include/llvm/Debuginfod/HTTPClient.h:77

Parameters

const llvm::HTTPRequest& Request
llvm::HTTPResponseHandler& Handler

unsigned int responseCode()

Description

Returns the last received response code or zero if none.

Declared at: llvm/include/llvm/Debuginfod/HTTPClient.h:80

void setTimeout(std::chrono::milliseconds Timeout)

Description

Sets the timeout for the entire request, in milliseconds. A zero or negative value means the request never times out.

Declared at: llvm/include/llvm/Debuginfod/HTTPClient.h:72

Parameters

std::chrono::milliseconds Timeout

~HTTPClient()

Declared at: llvm/include/llvm/Debuginfod/HTTPClient.h:57