Testing HTTP server and client.

Hierarchy

  • TestHttpServer

Accessors

Methods

  • Requests the data from the test server.

    Parameters

    • path: string

      Request path.

    • Optional options: RequestOptions

      Request options. The default request method is GET.

    Returns Promise<Response>

    A promise resolves to server response.

  • Posts the data to the test server.

    Parameters

    • path: string

      Request path.

    • Optional body: string | Buffer

      Request body to post, or undefined to post nothing.

    • Optional options: RequestOptions

      Request options. The default request method is POST.

    Returns Promise<Response>

    A promise resolves to server response.

Generated using TypeDoc