# Interface RequestHelper

A component used for making AJAX requests.

interface RequestHelper {
createSocket(url: string): WebSocket;
request(url: string, options?: RequestInit): Promise<Response>;
}

#### Implemented by

- DefaultRequestHelper

#####
Index

### Methods

createSocket
request

##
Methods

### createSocket

- createSocket(url): WebSocket

- Create a web socket.

  #### Parameters

  - url: string

    The web socket URL.

  #### Returns WebSocket

### request

- request(url, options?): Promise<Response>

- Makes a web request.

  #### Parameters

  - url: string

    The URL of the request.

  - `Optional` options: RequestInit

    Options for the request. See fetch() API in MDN.

  #### Returns Promise<Response>