DataRequest
-
Creates a response serializer that returns a SwiftyJSON object result type constructed from the response data using
JSONSerializationwith the specified reading options.Declaration
Swift
public static func serializeResponseSwiftyJSON( options: JSONSerialization.ReadingOptions = .allowFragments) -> DataResponseSerializer<JSON>Parameters
optionsThe JSON serialization reading options. Defaults to
.allowFragments.Return Value
A JSON object response serializer.
-
Adds a handler to be called once the request has finished.
Declaration
Swift
@discardableResult public func responseSwiftyJSON( queue: DispatchQueue? = nil, options: JSONSerialization.ReadingOptions = .allowFragments, completionHandler: @escaping (DataResponse<JSON>) -> Void) -> SelfParameters
optionsThe JSON serialization reading options. Defaults to
.allowFragments.completionHandlerA closure to be executed once the request has finished.
Return Value
The request.
View on GitHub
Install in Dash
DataRequest Extension Reference