init(url:method:headers:body:tlsConfiguration:)

    Create an HTTP Request.

    HTTPHandler.swift:251
    init(url: URL, method: HTTPMethod = .GET, headers: HTTPHeaders = HTTPHeaders(), body: Body? = nil, tlsConfiguration: TLSConfiguration?) throws

    Parameters

    url

    Remote URL.

    method

    HTTP method.

    headers

    Custom HTTP headers.

    body

    Request body.

    tlsConfiguration

    Request TLS configuration

    Throws

    • emptyScheme if URL does not contain HTTP scheme.

    • unsupportedScheme if URL does contains unsupported HTTP scheme.

    • emptyHost if URL does not contains a host.

    • missingSocketPath if URL does not contains a socketPath as an encoded host.

    Other members in extension

    Type members

    Instance members