Endpoint

public struct Endpoint<RequestType, ResponseType>

An endpoint in the REST meaning.

  • The method to use for the endpoint.

    Declaration

    Swift

    public let method: HTTPMethod
  • The path of the endpoint.

    Declaration

    Swift

    public let path: String
  • The parameter encoding to use for the endpoint.

    Declaration

    Swift

    public let encoding: RequestEncoding
  • Creates a new Endpoint.

    Declaration

    Swift

    public init(_ method: HTTPMethod, _ path: String, encoding: RequestEncoding)

    Parameters

    method

    The method to use for the endpoint.

    path

    The path of the endpoint.

    encoding

    The parameter encoding to use for the endpoint.