Inherits from NetworkDataTaskOperation : NetworkTaskOperation : NSOperation
Declared in NetworkUploadTaskOperation.h
NetworkUploadTaskOperation.m

Overview

Network Upload Task Operation

This operation is instantiated by NetworkManager when performing an upload. You will not have to interact directly with this class.

Tasks

Initialization

Instance Methods

initWithSession:request:data:

Initialize upload operation

- (instancetype)initWithSession:(NSURLSession *)session request:(NSURLRequest *)request data:(NSData *)data

Parameters

session

The NSURLSession used for the upload task.

request

The NSURLRequest.

data

The NSData for the body of the request.

Discussion

Note: Do not set the body of the request in the NSMutableURLRequest object via setHTTPBody, but rather use the data parameter of this method.

Declared In

NetworkUploadTaskOperation.h

initWithSession:request:fromFile:

Initialize upload operation

- (instancetype)initWithSession:(NSURLSession *)session request:(NSURLRequest *)request fromFile:(NSURL *)fromFile

Parameters

session

The NSURLSession used for the upload task.

request

The NSURLRequest.

fromFile

The file NSURL for the file containing the body of the request. This must be fully qualified URL, not a relative URL.

Discussion

Note: Do not set the body of the request in the NSMutableURLRequest object via setHTTPBody, but rather use the data parameter of this method.

Declared In

NetworkUploadTaskOperation.h