setData:withFileName:andContentType:forKey: method

Adds the contents of an NSData object to the request, clearing any others with the same key.

Syntax

- ( void ) setData : ( id ) data withFileName : ( NSString * ) fileName andContentType : ( NSString * ) contentType forKey : ( NSString * ) key

Remarks

You can specify the content-type and file name.