klyn.net.HttpRequest.withoutHeader
method

    public withoutHeader(name as String) as HttpRequest throws Exception:

Description

Returns a copy without one header.

Parameters

Parameter | Description
--- | ---
`name` | Header name to remove.

Returns

Updated request.

Throws

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

Example

    import klyn.net

    request = HttpRequest("https://example.com").withHeader("Accept", "application/json")
    request = request.withoutHeader("Accept")
    print(request.headers.size)