FoundationExtension
FoundationExtension is common Foundation/UIKit/Cocoa shortcuts and snippets collection.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
NSData(NSURLRequest) Category Reference

Creation methods extension using NSURLRequest. More...

#import <NSURLRequestCreations.h>

Instance Methods

(instancetype) - initWithContentsOfURLRequest:
 Initializes a newly allocated data object initialized with the data from the result specified by a given request. More...
 
(instancetype) - initWithContentsOfURLRequest:error:
 Initializes a newly allocated data object initialized with the data from the result specified by a given request. More...
 

Class Methods

(instancetype) + dataWithContentsOfURLRequest:
 Returns a data object with the data from the result specified by a given request. More...
 
(instancetype) + dataWithContentsOfURLRequest:error:
 Returns a data object with the data from the result specified by a given request. More...
 

Deprecated

(instancetype) - initWithContentsOfURL:postBody:encoding:
 
(instancetype) + dataWithContentsOfURL:postBody:encoding:
 

Detailed Description

Creation methods extension using NSURLRequest.

Method Documentation

+ (instancetype) dataWithContentsOfURL: (NSURL *)  url
postBody: (NSDictionary *)  bodyDictionary
encoding: (NSStringEncoding)  __deprecated 
Deprecated:
Use dataWithContentsOfURLRequest: with NSMutableURLRequest
+ (instancetype) dataWithContentsOfURLRequest: (NSURLRequest *)  request

Returns a data object with the data from the result specified by a given request.

See also
- initWithContentsOfURLRequest:
+ (instancetype) dataWithContentsOfURLRequest: (NSURLRequest *)  request
error: (NSError **)  errorPtr 

Returns a data object with the data from the result specified by a given request.

See also
- initWithContentsOfURLRequest:error:
- (instancetype) initWithContentsOfURL: (NSURL *)  url
postBody: (NSDictionary *)  bodyDictionary
encoding: (NSStringEncoding)  __deprecated 
Deprecated:
Use initWithContentsOfURLRequest: with NSMutableURLRequest
- (instancetype) initWithContentsOfURLRequest: (NSURLRequest *)  request

Initializes a newly allocated data object initialized with the data from the result specified by a given request.

Parameters
requestThe URLRequest from which to read data.
Returns
An NSData object initialized with the data from contents specified by request. The returned object might be different than the original receiver.
See also
- initWithContentsOfURLRequest:error:
+ dataWithContentsOfURLRequest:error:
- (instancetype) initWithContentsOfURLRequest: (NSURLRequest *)  request
error: (NSError **)  errorPtr 

Initializes a newly allocated data object initialized with the data from the result specified by a given request.

Parameters
requestThe URLRequest from which to read data.
errorPtrIf there is an error reading in the data, upon return contains an NSError object that describes the problem.
Returns
An NSData object initialized with the data from contents specified by request. The returned object might be different than the original receiver.
See also
- initWithContentsOfURLRequest:
+ dataWithContentsOfURLRequest:

The documentation for this category was generated from the following file: