Protocols
The following protocols are available globally.
-
A
Requestable
is an interfaces for types that express the details of an HTTP requestTypes that conform to
Requestable
can be used as a paramater inRequestManager
‘smakeRequest
method, to create an observable combine publisher.Requestable
is a generic procol that requires to you specify the request body, respose body, and error model.Depending on what types you use to specialize the protocol, parts of the interface maybe already implemented for you. See the documentation on each protocol requirement for more information.
See moreDeclaration
Swift
public protocol Requestable
-
A protocol for types that can be expressed as
See moreData
Declaration
Swift
public protocol AutomaticBodyEncoding
-
A protocol for types that can be initialized from
See moreData
provided by a network responseDeclaration
Swift
public protocol AutomaticBodyDecoding
-
A
Requestable
with basic HTTP status code based response validationDeclaration
Swift
public protocol HTTPRequest : Requestable where Self.ResponseError == HTTPError
-
A
Requestable
with no validation – all completed requests will be considered safe regardless of status code, headers, or bodyDeclaration
Swift
public protocol Request : Requestable where Self.ResponseError == NoError