APIResponse

public struct APIResponse<Value>

Used to store all data associated with a response.

  • The URL request sent to the server.

    Declaration

    Swift

    public let request: URLRequest?
  • The data returned by the server.

    Declaration

    Swift

    public let data: Data?
  • The server’s response to the URL request.

    Declaration

    Swift

    public let response: HTTPURLResponse?
  • The associated value of the response from the server.

    Declaration

    Swift

    public let value: Value
  • A ListInfo object representing list information of a request returning a list value.

    Note

    If request did not return a list value, this is nil

    Declaration

    Swift

    public let listInfo: ListInfo?
  • Undocumented

    Declaration

    Swift

    public init(request: URLRequest?, data: Data?, response: HTTPURLResponse?,
                value: Value, listInfo: ListInfo?)
  • Creates an APIResponse instance with the specified request, data, response and value.

    Declaration

    Swift

    public init(request: URLRequest?, data: Data?, response: HTTPURLResponse?, value: Value)

    Parameters

    request

    A URLRequest value.

    data

    A Data value.

    response

    A HTTPURLResponse.

    value

    The associated type value