AnyHttpService
public struct AnyHttpService : HttpService
                This entity provides a way to initialize an HTTP service without implementing the HttpService
protocol in a custom entity. Note that you should usually implement the HttpService protocol
instead of simply using an instance of AnyHttpService. This class is mainly used internally.
- 
                  
                  
Declaration
Swift
public let apiUrl: UrlConvertible - 
                  
                  
Declaration
Swift
public let header: HttpHeader - 
                  
                  
Declaration
Swift
public let sessionConfiguration: URLSessionConfiguration - 
                  
                  
Declaration
Swift
public let retrierFactory: RetrierFactory 
- 
                  
                  
Initializes a new HTTP service while setting all parameters as provided.
Declaration
Swift
public init(at url: UrlConvertible, header: HttpHeader = [:], sessionConfiguration: URLSessionConfiguration = .default, retrierFactory: RetrierFactory = NilRetrier.factory(), processError: @escaping (Squid.Error) -> Void = { _ in })Parameters
urlThe URL of the API represented by the HTTP service.
headerThe header fields shared among all requests. Defaults to no fields.
sessionConfigurationThe session configuration to use for all requests. Defaults to
URLSessionConfiguration.default.retrierFactoryAn instance of a retrier factory to generate retriers from.
processErrorA closure to execute on request errors.
 
            View on GitHub
          
      AnyHttpService Structure Reference