An interface describing HTTP clients.
Implementing classes are responsible for setting the content type header if needed. Implementations are also responsible for preventing response caching. If needed this can be done by adding a cache-bust query parameter.

Hierarchy

  • HttpClient

Methods

Methods

  • Prepares an HTTP DELETE request.

    Parameters

    • url: string

      The URL to send the request to.

    Returns HttpRequest

    An object that can be used to configure and send the DELETE request.

  • Prepares an HTTP GET request.

    Parameters

    • url: string

      The URL to send the request to.

    Returns HttpRequest

    An object that can be used to configure and send the GET request.

  • Prepares an HTTP POST request.

    Parameters

    • url: string

      The URL to send the request to.

    • Optional body: object

      The request body to send.

    Returns HttpRequest

    An object that can be used to configure and send the POST request.

  • Prepares an HTTP PUT request.

    Parameters

    • url: string

      The URL to send the request to.

    • Optional body: object

      The request body to send.

    Returns HttpRequest

    An object that can be used to configure and send the PUT request.