GPKGNetworkUtils

Objective-C

@interface GPKGNetworkUtils : NSObject

Swift

class GPKGNetworkUtils : NSObject

Network Utilities

  • Send a synchronous network request

    Declaration

    Objective-C

    + (NSData *)sendSynchronousRequest:(NSURLRequest *)request
                     returningResponse:(NSURLResponse **)response
                                 error:(NSError **)error;

    Swift

    class func sendSynchronousRequest(_ request: URLRequest!, returning response: AutoreleasingUnsafeMutablePointer<URLResponse?>!) throws -> Data

    Parameters

    request

    url request

    response

    url response

    error

    network error

    Return Value

    response data

  • Send a synchronous network request with attempted redirect response updated request

    Declaration

    Objective-C

    + (NSData *)sendSynchronousWithRedirectsRequest:(NSMutableURLRequest *)request
                                            withUrl:(NSString *)url;

    Swift

    class func sendSynchronous(withRedirectsRequest request: NSMutableURLRequest!, withUrl url: String!) -> Data!

    Parameters

    request

    url request

    url

    url value

    Return Value

    response data