klyn.net.HttpClient.request
method

    public request(method as String,
    url as Object,
    headers as Map<String, String> = null,
    body as Object = null) as HttpResponse throws Exception:

Description

Sends one request built from ad-hoc values.

Parameters

- method HTTP method.
- url Absolute HTTP or HTTPS URL.
- headers Optional request headers.
- body Optional request body.

Returns

HTTP response. ```klyn import klyn.net client = HttpClient() response = client.request("GET", "https://example.com") print(response.statusCode)` ``