klyn.net.HttpClient.send
method

    public send(request as HttpRequest) as HttpResponse throws Exception:

Description

Sends one HTTP request.

Parameters

Parameter | Description
--- | ---
`request` | Immutable request to send.

Returns

HTTP response.

Throws

- Exception if request validation, serialization, network transport, TLS handling, or response creation fails.

Example

    import klyn.net

    client = HttpClient()
    response = client.send(HttpRequest("https://example.com"))
    print(response.ok)