Response

public enum Response<R: Resource, P, M, Payload>

The response value passed back to handlers calling the Service. It encodes the success or failure of a request.

  • The request was successful, but returned no data.

    Declaration

    Swift

    case empty(path: Path<R, P, M>, headers: [Header])
  • The request was successful and has a payload.

    Declaration

    Swift

    case success(path: Path<R, P, M>, result: Payload, headers: [Header])
  • There was an error processing the request. This case captures an Error value that describes the issue.

    Declaration

    Swift

    case error(path: Path<R, P, M>, result: Error, headers: [Header])