URLRequest

public extension URLRequest
extension URLRequest: URLRequestProvider
  • HTTPMethod of the request.

    Declaration

    Swift

    var method: HTTPMethod? { get set }
  • Returns self.

    Declaration

    Swift

    public func urlRequest() throws -> URLRequest
  • Creates an instance with the specified url, method, and headers.

    Throws

    Any error thrown while converting the URLConvertible to a URL.

    Declaration

    Swift

    init(url: URLProvider, method: HTTPMethod, headers: Headers? = nil) throws

    Parameters

    url

    The URLConvertible value.

    method

    The HTTPMethod.

    headers

    The HTTPHeaders, nil by default.