HttpConnection
open class HttpConnection : HttpConnectionProtocol
Simple HttpConnection implementation
-
Default number of maximum concurrent operations
Declaration
Swift
public static let defaulMaxConcurrentOperationCount: Int
-
Init
Declaration
Swift
public init(adapters: [HttpRequestAdapter] = [])
Parameters
adapters
request adapters
-
Sends Request and returns Response over http
Throws
ServiceConnectionError.noUrlInRequest if provided URLRequest doesn’t have url ServiceConnectionError.wrongResponseType if response is not of HTTPURLResponse typeDeclaration
Swift
public func send(_ request: Request) throws -> GenericOperation<Response>
Parameters
request
Request to send
Return Value
Obtained response