Request

public struct Request<R: Resource, P, M>

Encodes a request — path, URL, body etc — and is generated by the Service. It’s generic types are there for the Path instance it captures.

  • The Path for this request. Which encodes the Resource, the response — single or many — and the HTTP method.

    Declaration

    Swift

    public let path: Path<R, P, M>
  • URL

    The fully-qualified URL for the request.

    Declaration

    Swift

    public let URL: URL
  • The values to be encoded into a query string.

    Declaration

    Swift

    public let query: [String: String]?
  • The request body encoded as a string.

    Declaration

    Swift

    public let body: String?
  • The request headers.

    Declaration

    Swift

    public var headers: [Header]?
  • The request headers encoded as strings.

    Declaration

    Swift

    public var headers: [String: String]?