Endpoint

open class Endpoint

Class for reifying a target of the Target enum unto a concrete Endpoint.

Note

As of Moya 11.0.0 Endpoint is no longer generic. Existing code should work as is after removing the generic. See #1529 and #1524 for the discussion.
  • Returns the Endpoint converted to a URLRequest if valid. Throws an error otherwise.

    Declaration

    Swift

    func urlRequest() throws -> URLRequest
  • Declaration

    Swift

    public func hash(into hasher: inout Hasher)
  • Note: If both Endpoints fail to produce a URLRequest the comparison will fall back to comparing each Endpoint’s hashValue.

    Declaration

    Swift

    public static func == (lhs: Endpoint, rhs: Endpoint) -> Bool