RestingRequest

open class RestingRequest<RequestType, ResponseType>

Represents a high-level HTTP Request.

  • The endpoint for the request.

    Declaration

    Swift

    public let endpoint: Endpoint<RequestType, ResponseType>
  • The parameters for the request.

    Declaration

    Swift

    public let body: RequestType
  • The headers for the request.

    Declaration

    Swift

    public let headers: [String : String]
  • The variables to substitute in the endpoint’s path.

    Declaration

    Swift

    public let pathVariables: [String : Any]
  • Creates a new RestingRequest.

    Declaration

    Swift

    public init(endpoint: Endpoint<RequestType, ResponseType>,
                body: RequestType,
                headers: [String: String] = [:],
                pathVariables: [String: Any] = [:])

    Parameters

    endpoint

    The endpoint for the request.

    body

    The parameters for the request.

    header

    The headers for the request.

    pathVariables

    The variables to substitute in the endpoint’s path.