# Class HttpClient

A basic HTTP client used to send messages to a remote end.

#### Hierarchy

- HttpClient

#####
Index

### Constructors

constructor

### Methods

send

## Constructors

### constructor

- new HttpClient(serverUrl, opt_agent?, opt_proxy?): HttpClient

- #### Parameters

  - ##### serverUrl: string

    URL for the WebDriver server to send commands to.

  - ##### `Optional` opt_agent: any

    The agent to use for each request. Defaults to `http.globalAgent`.

  - ##### `Optional` opt_proxy: string

    The proxy to use for the connection to the server. Default is to use no proxy.

  #### Returns HttpClient

## Methods

### send

- send(httpRequest): Promise<Response>

- Sends a request to the server. The client will automatically follow any redirects returned by the server, fulfilling the returned promise with the final response.

  #### Parameters

  - ##### httpRequest: Request

    The request to send.

  #### Returns Promise<Response>

  A promise that will be fulfilled with the server's response.

Generated using TypeDoc