Defines protocol for objects which converts TRCRequest.requestBody object into NSData
More...

Instance Methods | |
| (NSData *) | - bodyDataFromObject:forRequest:error: |
Convert your requestObject into NSData here. More... | |
| (NSInputStream *) | - bodyStreamFromObject:forRequest:error: |
Convert your requestObject into NSInputStream here. More... | |
| (NSString *) | - contentType |
| This is string which would be used as Content-Type HTTP header value. More... | |
Defines protocol for objects which converts TRCRequest.requestBody object into NSData
You should implement one of these method:
dataFromRequestObject:error:dataStreamFromRequestObject:error:If both implemented, then only dataFromRequestObject:error will be used.
|
optional |
Convert your requestObject into NSData here.
| requestObject | object taken from TRCRequest.requestBody |
| error | write NSError into that pointer if error happens |
|
optional |
Convert your requestObject into NSInputStream here.
This method useful in next cases:
requestObject is NSInputStreamrequestObject points to file to upload, or too large to be loaded into memory| requestObject | object taken from TRCRequest.requestBody |
| error | write NSError into that pointer if error happens |
|
optional |
This is string which would be used as Content-Type HTTP header value.
If not implemented or returns nil, then Content-Type would not be specified.