http client

interface Client {
    del(url, callOptions?): "http".Response;
    get(url, callOptions?): "http".Response;
    patch(url, callOptions?): "http".Response;
    post(url, callOptions?): "http".Response;
    put(url, callOptions?): "http".Response;
    request(method, url, callOptions?): "http".Response;
    requestAsync(method, url, callOptions?): Promise<"http".Response>;
    response(): "http".Response;
}

Methods

  • http async request method

    Parameters

    • method: Method

      http request method

    • url: string

      the request url

    • Optional callOptions: "http".Request

      the request options

    Returns Promise<"http".Response>

    Since

    24.7.0 only js2.0 support

  • get sync request response value

    notes: only get request's response, cannot get requestAsync's response

    Returns "http".Response