Protocols
The following protocols are available globally.
-
A
Requestableis an interfaces for types that express the details of an HTTP requestTypes that conform to
Requestablecan be used as a paramater inRequestManager‘smakeRequestmethod, to create an observable combine publisher.Requestableis 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 moreDataDeclaration
Swift
public protocol AutomaticBodyEncoding -
A protocol for types that can be initialized from
See moreDataprovided by a network responseDeclaration
Swift
public protocol AutomaticBodyDecoding -
A
Requestablewith basic HTTP status code based response validationDeclaration
Swift
public protocol HTTPRequest : Requestable where Self.ResponseError == HTTPError -
A
Requestablewith 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
View on GitHub
Install in Dash
Protocols Reference