HPNetwork Documentation Beta

Protocol Network​Request

public protocol NetworkRequest 
NetworkRequest NetworkRequest DecodableRequest DecodableRequest DecodableRequest->NetworkRequest

Types Conforming to Network​Request

DecodableRequest

Requirements

finishing​Queue

var finishingQueue: DispatchQueue 

url

var url: URL? 

http​Body

var httpBody: Data? 

url​Session

var urlSession: URLSession 

header​Fields

var headerFields: [NetworkRequestHeaderField]? 

request​Method

var requestMethod: NetworkRequestMethod 

authentication

var authentication: NetworkRequestAuthentication? 

convert​Response(response:​)

func convertResponse(response: NetworkResponse) throws -> Output

convert​Error(_:​data:​response:​)

func convertError(_ error: Error, data: Data?, response: URLResponse?) -> Error