ResultFormat
public enum ResultFormatDefines the format of the URL response body
- 
                  
                  The body of the response will be JSON decoded DeclarationSwift case json
- 
                  
                  Decodes and the provided data into an instance of the provided type, for the current format. If the current format is .raw, the rawRaw(Data) will be returned.Throws Error if unable to deocde the data based on the current format.DeclarationSwift public func decode<T: Decodable>(result: Data, `as` type: T.Type, dateDecodingStrategy: JSONDecoder.DateDecodingStrategy = .deferredToDate) throws -> TParametersresultThe HTTPURLResponse data to decode typeThe instance to inflate from the decoded data dateDecodingStrategyThe JSONDecoder.DateDecodingStrategy to use when deserializing Date objects. Defaults to .deferredToDateReturn ValueAn inflated instance of T 
- 
                  
                  Returns a new URLRequest with the appropriately applied headers base on this ResultFormat For example, for .raw, no headers are applied, for.json,application/jsonheaders are set forAcceptandContent-Type, etc.DeclarationSwift public func headers(for request: URLRequest) -> URLRequestParametersrequestThe request upon which the HTTPHeaders are to be set. Return ValueA new URLRequest with the set headers. 
 View on GitHub
View on GitHub ResultFormat Enumeration Reference
        ResultFormat Enumeration Reference