Skip to content

Commit

Permalink
Change dataTaskWithHTTPMethod visibility to public (AFNetworking#4007)
Browse files Browse the repository at this point in the history
Change -dataTaskWithHTTPMethod visibility from private to public.

Co-authored-by: Sergio M. Pereira <[email protected]>
  • Loading branch information
Sergio Martins Pereira and Sergio M. Pereira authored Mar 27, 2020
1 parent 67f558f commit a5a9436
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions AFNetworking/AFHTTPSessionManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,27 @@ NS_ASSUME_NONNULL_BEGIN
success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure;

/**
Creates an `NSURLSessionDataTask` with a custom `HTTPMethod` request.
@param method The HTTPMethod string used to create the request.
@param URLString The URL string used to create the request URL.
@param parameters The parameters to be encoded according to the client request serializer.
@param uploadProgress A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue.
@param downloadProgress A block object to be executed when the download progress is updated. Note this block is called on the session queue, not the main queue.
@param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.
@param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
@see -dataTaskWithRequest:uploadProgress:downloadProgress:completionHandler:
*/
- (NSURLSessionDataTask *)dataTaskWithHTTPMethod:(NSString *)method
URLString:(NSString *)URLString
parameters:(nullable id)parameters
uploadProgress:(nullable void (^)(NSProgress *uploadProgress)) uploadProgress
downloadProgress:(nullable void (^)(NSProgress *downloadProgress)) downloadProgress
success:(void (^)(NSURLSessionDataTask *, id))success
failure:(void (^)(NSURLSessionDataTask *, NSError *))failure;

@end

NS_ASSUME_NONNULL_END

0 comments on commit a5a9436

Please sign in to comment.