Minor revisions to documentation, mostly around style and conventions
This commit is contained in:
parent
eebc763f7f
commit
7a2cad0a56
5 changed files with 20 additions and 18 deletions
|
|
@ -158,7 +158,7 @@
|
|||
Creates and enqueues an `AFHTTPRequestOperation` to the HTTP client's operation queue.
|
||||
|
||||
@param request The request object to be loaded asynchronously during execution of the operation.
|
||||
@param success A block object to be executed when the request operation finishes successfully, with a status code in the 2xx range, and with an acceptable content types (e.g. `application/json`). This block has no return value and takes a single argument, which is the response object created from the response data of request.
|
||||
@param success A block object to be executed when the request operation finishes successfully, with a status code in the 2xx range, and with an acceptable content type (e.g. `application/json`). This block has no return value and takes a single argument, which is the response object created from the response data of request.
|
||||
@param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data as JSON. This block has no return value and takes a single argument, which is the `NSError` object describing the network or parsing error that occurred.
|
||||
*/
|
||||
- (void)enqueueHTTPOperationWithRequest:(NSURLRequest *)request
|
||||
|
|
@ -186,7 +186,7 @@
|
|||
|
||||
@param path The path to be appended to the HTTP client's base URL and used as the request URL.
|
||||
@param parameters The parameters to be encoded and appended as the query string for the request URL.
|
||||
@param success A block object to be executed when the request operation finishes successfully, with a status code in the 2xx range, and with an acceptable content types (e.g. `application/json`). This block has no return value and takes a single argument, which is the response object created from the response data of request.
|
||||
@param success A block object to be executed when the request operation finishes successfully, with a status code in the 2xx range, and with an acceptable content type (e.g. `application/json`). This block has no return value and takes a single argument, which is the response object created from the response data of request.
|
||||
@param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data as JSON. This block has no return value and takes a single argument, which is the `NSError` object describing the network or parsing error that occurred.
|
||||
*/
|
||||
- (void)getPath:(NSString *)path
|
||||
|
|
@ -199,7 +199,7 @@
|
|||
|
||||
@param path The path to be appended to the HTTP client's base URL and used as the request URL.
|
||||
@param parameters The parameters to be encoded and set in the request HTTP body.
|
||||
@param success A block object to be executed when the request operation finishes successfully, with a status code in the 2xx range, and with an acceptable content types (e.g. `application/json`). This block has no return value and takes a single argument, which is the response object created from the response data of request.
|
||||
@param success A block object to be executed when the request operation finishes successfully, with a status code in the 2xx range, and with an acceptable content type (e.g. `application/json`). This block has no return value and takes a single argument, which is the response object created from the response data of request.
|
||||
@param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data as JSON. This block has no return value and takes a single argument, which is the `NSError` object describing the network or parsing error that occurred.
|
||||
*/
|
||||
- (void)postPath:(NSString *)path
|
||||
|
|
@ -212,7 +212,7 @@
|
|||
|
||||
@param path The path to be appended to the HTTP client's base URL and used as the request URL.
|
||||
@param parameters The parameters to be encoded and set in the request HTTP body.
|
||||
@param success A block object to be executed when the request operation finishes successfully, with a status code in the 2xx range, and with an acceptable content types (e.g. `application/json`). This block has no return value and takes a single argument, which is the response object created from the response data of request.
|
||||
@param success A block object to be executed when the request operation finishes successfully, with a status code in the 2xx range, and with an acceptable content type (e.g. `application/json`). This block has no return value and takes a single argument, which is the response object created from the response data of request.
|
||||
@param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data as JSON. This block has no return value and takes a single argument, which is the `NSError` object describing the network or parsing error that occurred.
|
||||
*/
|
||||
- (void)putPath:(NSString *)path
|
||||
|
|
@ -225,7 +225,7 @@
|
|||
|
||||
@param path The path to be appended to the HTTP client's base URL and used as the request URL.
|
||||
@param parameters The parameters to be encoded and set in the request HTTP body.
|
||||
@param success A block object to be executed when the request operation finishes successfully, with a status code in the 2xx range, and with an acceptable content types (e.g. `application/json`). This block has no return value and takes a single argument, which is the response object created from the response data of request.
|
||||
@param success A block object to be executed when the request operation finishes successfully, with a status code in the 2xx range, and with an acceptable content type (e.g. `application/json`). This block has no return value and takes a single argument, which is the response object created from the response data of request.
|
||||
@param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data as JSON. This block has no return value and takes a single argument, which is the `NSError` object describing the network or parsing error that occurred.
|
||||
*/
|
||||
- (void)deletePath:(NSString *)path
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ extern NSString * const AFHTTPOperationDidFinishNotification;
|
|||
Creates and returns an `AFHTTPRequestOperation` object and sets the specified completion callback.
|
||||
|
||||
@param urlRequest The request object to be loaded asynchronously during execution of the operation.
|
||||
@param completion A block object to be executed when the HTTP request operation is finished. This block has no return value and takes four arguments: the NSURLRequest sent from the client and the NSHTTPURLResponse received from the server, the NSData received by the server during the execution of the request, and an NSError, which will have been set if an error occured while loading the request.
|
||||
@param completion A block object to be executed when the HTTP request operation is finished. This block has no return value and takes four arguments: the request sent from the client, the response received from the server, the HTTP body received by the server during the execution of the request, and an error, which will have been set if an error occured while loading the request.
|
||||
|
||||
@see operationWithRequest:inputStream:outputStream:completion
|
||||
|
||||
|
|
@ -101,8 +101,8 @@ extern NSString * const AFHTTPOperationDidFinishNotification;
|
|||
|
||||
@param urlRequest The request object to be loaded asynchronously during execution of the operation.
|
||||
@param inputStream The input stream object for reading data to be sent during the request. If set, the input stream is set as the HTTPBodyStream on the NSMutableURLRequest, and the request method is changed to `POST`. This argument may be `nil`.
|
||||
@param outputStream The output stream object for writing data received during the request. If set, data accumulated in NSURLConnectionDelegate methods will be sent to the output stream, and the NSData parameter in the completion block will be `nil`. This argument may be `nil`.
|
||||
@param completion A block object to be executed when the HTTP request operation is finished. This block has no return value and takes four arguments: the NSURLRequest sent from the client and the NSHTTPURLResponse received from the server, the NSData received by the server during the execution of the request, and an NSError, which will have been set if an error occured while loading the request. This argument may be `NULL`.
|
||||
@param outputStream The output stream object for writing data received during the request. If set, data accumulated in `NSURLConnectionDelegate` methods will be sent to the output stream, and the NSData parameter in the completion block will be `nil`. This argument may be `nil`.
|
||||
@param completion A block object to be executed when the HTTP request operation is finished. This block has no return value and takes four arguments: the request sent from the client, the response received from the server, the NSData received by the server during the execution of the request, and an error, which will have been set if an error occured while loading the request. This argument may be `nil`.
|
||||
|
||||
@see operationWithRequest:completion
|
||||
|
||||
|
|
@ -129,7 +129,7 @@ extern NSString * const AFHTTPOperationDidFinishNotification;
|
|||
/**
|
||||
Sets a callback to be called when an undetermined number of bytes have been uploaded to the server.
|
||||
|
||||
@param block A block object to be called when an undetermined number of bytes have been uploaded to the server. This block has no return value and takes two arguments: the total bytes read, and the total bytes expected to be read during the request, as initially determined by the expected content size of the NSHTTPURLResponse. This block may be called multiple times.
|
||||
@param block A block object to be called when an undetermined number of bytes have been uploaded to the server. This block has no return value and takes two arguments: the total bytes read, and the total bytes expected to be read during the request, as initially determined by the expected content size of the `NSHTTPURLResponse` object. This block may be called multiple times.
|
||||
|
||||
@see setUploadProgressBlock
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
Creates and returns an `AFImageRequestOperation` object and sets the specified success callback.
|
||||
|
||||
@param urlRequest The request object to be loaded asynchronously during execution of the operation.
|
||||
@param success A block object to be executed when the request finishes successfully, with a status code in the 2xx range, and with an acceptable content types (e.g. `image/png`). This block has no return value and takes a single arguments, the image created from the response data of the request.
|
||||
@param success A block object to be executed when the request finishes successfully, with a status code in the 2xx range, and with an acceptable content type (e.g. `image/png`). This block has no return value and takes a single arguments, the image created from the response data of the request.
|
||||
|
||||
@return A new image request operation
|
||||
*/
|
||||
|
|
@ -47,8 +47,8 @@
|
|||
Creates and returns an `AFImageRequestOperation` object and sets the specified success callback.
|
||||
|
||||
@param urlRequest The request object to be loaded asynchronously during execution of the operation.
|
||||
@param success A block object to be executed when the request finishes successfully, with a status code in the 2xx range, and with an acceptable content types (e.g. `image/png`). This block has no return value and takes a three arguments: the request object of the operation, the response for the request, and the image created from the response data.
|
||||
@param success A block object to be executed when the request finishes unsuccessfully. This block has no return value and takes a three arguments: the request object of the operation, the response for the request, and the error associated with the cause for the unsuccessful operation.
|
||||
@param success A block object to be executed when the request finishes successfully, with a status code in the 2xx range, and with an acceptable content type (e.g. `image/png`). This block has no return value and takes a three arguments: the request object of the operation, the response for the request, and the image created from the response data.
|
||||
@param failure A block object to be executed when the request finishes unsuccessfully. This block has no return value and takes a three arguments: the request object of the operation, the response for the request, and the error associated with the cause for the unsuccessful operation.
|
||||
|
||||
@return A new image request operation
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -77,7 +77,9 @@ static dispatch_queue_t image_request_operation_processing_queue() {
|
|||
}
|
||||
});
|
||||
|
||||
[[AFImageCache sharedImageCache] cacheImage:image forURL:[request URL] cacheName:cacheNameOrNil];
|
||||
if ([request cachePolicy] != NSURLCacheStorageNotAllowed) {
|
||||
[[AFImageCache sharedImageCache] cacheImage:image forURL:[request URL] cacheName:cacheNameOrNil];
|
||||
}
|
||||
}
|
||||
});
|
||||
}];
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
Creates and returns an `AFJSONRequestOperation` object and sets the specified success callback.
|
||||
|
||||
@param urlRequest The request object to be loaded asynchronously during execution of the operation
|
||||
@param success A block object to be executed when the JSON request operation finishes successfully, with a status code in the 2xx range, and with an acceptable content types (e.g. `application/json`). This block has no return value and takes a single argument, which is the JSON object created from the response data of request, or nil if there was an error.
|
||||
@param success A block object to be executed when the JSON request operation finishes successfully, with a status code in the 2xx range, and with an acceptable content type (e.g. `application/json`). This block has no return value and takes a single argument, which is the JSON object created from the response data of request, or nil if there was an error.
|
||||
|
||||
@see defaultAcceptableStatusCodes
|
||||
@see defaultAcceptableContentTypes
|
||||
|
|
@ -54,8 +54,8 @@
|
|||
Creates and returns an `AFJSONRequestOperation` object and sets the specified success and failure callbacks.
|
||||
|
||||
@param urlRequest The request object to be loaded asynchronously during execution of the operation
|
||||
@param success A block object to be executed when the JSON request operation finishes successfully, with a status code in the 2xx range, and with an acceptable content types (e.g. `application/json`). This block has no return value and takes a single argument, which is the JSON object created from the response data of request.
|
||||
@param failure A block object to be executed when the JSON request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data as JSON. This block has no return value and takes a single argument, which is the `NSError` object describing the network or parsing error that occurred.
|
||||
@param success A block object to be executed when the JSON request operation finishes successfully, with a status code in the 2xx range, and with an acceptable content type (e.g. `application/json`). This block has no return value and takes a single argument, which is the JSON object created from the response data of request.
|
||||
@param failure A block object to be executed when the JSON request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data as JSON. This block has no return value and takes a single argument, which is the error describing the network or parsing error that occurred.
|
||||
|
||||
@see defaultAcceptableStatusCodes
|
||||
@see defaultAcceptableContentTypes
|
||||
|
|
@ -73,8 +73,8 @@
|
|||
@param urlRequest The request object to be loaded asynchronously during execution of the operation
|
||||
@param acceptableStatusCodes An `NSIndexSet` object that specifies the ranges of acceptable status codes. If you specify nil, all status codes will be considered acceptable.
|
||||
@param acceptableContentTypes An `NSSet` object that specifies the acceptable content types. If you specify nil, all content types will be considered acceptable.
|
||||
@param success A block object to be executed when the JSON request operation finishes successfully, with a status code in the 2xx range, and with an acceptable content types (e.g. `application/json`). This block has no return value and takes a single argument, which is the JSON object created from the response data of request.
|
||||
@param failure A block object to be executed when the JSON request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data as JSON. This block has no return value and takes a single argument, which is the `NSError` object describing the network or parsing error that occurred.
|
||||
@param success A block object to be executed when the JSON request operation finishes successfully, with a status code in the 2xx range, and with an acceptable content type (e.g. `application/json`). This block has no return value and takes three arguments, the request sent from the client, the response received from the server, and the JSON object created from the response data of request.
|
||||
@param failure A block object to be executed when the JSON request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data as JSON. This block has no return value and takes three arguments, the request sent from the client, the response received from the server, and the error describing the network or parsing error that occurred.
|
||||
|
||||
@return A new JSON request operation
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue