# Class: HTTPRequest

## HTTPRequest()

Class with static methods used in HTTP requests

## Constructor

#### new HTTPRequest()

Source:
  - http_request.js, line 10

### Methods

#### (async, static) openDataURL(url) → {Promise.<Buffer>}

Performs a GET to an URL and returns a promise to its body as a Buffer

##### Parameters:

Name | Type | Description
--- | --- | ---
`url` | string | URL of the desired content to GET

Source:
  - http_request.js, line 18

##### Returns:

Buffer with the content of the body from the HTTP response

Type
  Promise.<Buffer>

#### (async, static) request(options) → {Promise.<string>}

Performs a request and returns a promise to the body as a string

##### Parameters:

Name | Type | Description
--- | --- | ---
`options` | Object | Object with the parameters to the request ###### Properties
Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`url` | string |  |  | URL of the request
`method` | string | <optional> | 'get' | HTTP verb of the request
`payload` | Object | <optional> | {} | Body content of the requisition
`timeout` | number | <optional> | 60000 | Timeout of the request in miliseconds

Source:
  - http_request.js, line 38

##### Returns:

Type
  Promise.<string>