NSURLRequest(Extensions) Category Reference

Declared in NSURLRequest+Extensions.h

Overview

NSURLRequest extensions.

  outputDescription

A human readable debugging description of the NSURLRequest object.

@property (nonatomic, readonly, nonnull) NSString *outputDescription

Declared In

NSURLRequest+Extensions.h

– uniqueHashWithHTTPHeaderExceptions:

Generates a unique hash for the NSURLRequest with the exception of the given http header names which are ignored.

- (nonnull NSString *)uniqueHashWithHTTPHeaderExceptions:(nullable NSArray<NSString*> *)httpHeaderExceptions

Parameters

httpHeaderExceptions

An NSArray of HTTP header names to ignore.

Return Value

The unique hash NSString object.

Declared In

NSURLRequest+Extensions.h

  uniqueHash

A unique hash string for the NSURLRequest.

@property (nonatomic, readonly, nonnull) NSString *uniqueHash

Declared In

NSURLRequest+Extensions.h

+ authorizationHeaderWithUsername:password:

Generates a HTTP ‘Authorization’ header with the given credentials.

+ (nonnull NSDictionary<NSString*,NSString*> *)authorizationHeaderWithUsername:(nonnull NSString *)username password:(nonnull NSString *)password

Parameters

username

The username to use.

password

The password to use.

Return Value

A NSDictionary object containing the header.

Declared In

NSURLRequest+Extensions.h

+ httpGetRequestWithURL:customHTTPHeaders:

Creates a new HTTP GET request.

+ (nonnull NSURLRequest *)httpGetRequestWithURL:(nonnull NSString *)url customHTTPHeaders:(nullable NSDictionary<NSString*,NSString*> *)customHTTPHeaders

Parameters

url

The URL of the request.

customHTTPHeaders

The custom HTTP headers to include.

Return Value

The new NSURLRequest object.

Declared In

NSURLRequest+Extensions.h

+ httpPostRequestWithURL:andData:customHTTPHeaders:

Creates a new HTTP POST request.

+ (nonnull NSURLRequest *)httpPostRequestWithURL:(nonnull NSString *)url andData:(nullable NSData *)data customHTTPHeaders:(nullable NSDictionary<NSString*,NSString*> *)customHTTPHeaders

Parameters

url

The URL of the request.

data

The HTTP body data of the request.

customHTTPHeaders

The custom HTTP headers to include.

Return Value

The new NSURLRequest object.

Declared In

NSURLRequest+Extensions.h