Skip to content

eleven-huang/AFNetworking

 
 

Repository files navigation

forked from AFNetworking/AFNetworking

#Changes Add finish block for all http methods in AFHttpRequestOperationManager.

	- (AFHTTPRequestOperation *)HTTPRequestOperationWithRequest:(NSURLRequest *)request
                                                success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
                                                failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure
                                                 finish:(void (^)(AFHTTPRequestOperation *operation))finish;
	
	                            
	- (AFHTTPRequestOperation *)GET:(NSString *)URLString
                 parameters:(NSDictionary *)parameters
                    success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
                    failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure
                     finish:(void (^)(AFHTTPRequestOperation *operation))finish;
                     
                     
	- (AFHTTPRequestOperation *)HEAD:(NSString *)URLString
                  parameters:(NSDictionary *)parameters
                     success:(void (^)(AFHTTPRequestOperation *operation))success
                     failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure
                      finish:(void (^)(AFHTTPRequestOperation *operation))finish;
                      
                      
	- (AFHTTPRequestOperation *)POST:(NSString *)URLString
                  parameters:(NSDictionary *)parameters
                     success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
                     failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure
                      finish:(void (^)(AFHTTPRequestOperation *operation))finish;
                      
                      
	- (AFHTTPRequestOperation *)POST:(NSString *)URLString
                  parameters:(NSDictionary *)parameters
   constructingBodyWithBlock:(void (^)(id <AFMultipartFormData> formData))block
                     success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
                     failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure
                      finish:(void (^)(AFHTTPRequestOperation *operation))finish;
                      
                      
	- (AFHTTPRequestOperation *)PUT:(NSString *)URLString
                 parameters:(NSDictionary *)parameters
                    success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
                    failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure
                     finish:(void (^)(AFHTTPRequestOperation *operation))finish;
                     
                     
	- (AFHTTPRequestOperation *)PATCH:(NSString *)URLString
                   parameters:(NSDictionary *)parameters
                      success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
                      failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure
                       finish:(void (^)(AFHTTPRequestOperation *operation))finish;
                     
                       
	- (AFHTTPRequestOperation *)DELETE:(NSString *)URLString
                    parameters:(NSDictionary *)parameters
                       success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
                       failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure
                        finish:(void (^)(AFHTTPRequestOperation *operation))finish;

They think it is not neccessary, but i think this is a more elegant solution.

About

A delightful iOS and OS X networking framework

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 97.6%
  • C 1.8%
  • Ruby 0.6%