Skip to content

Commit

Permalink
Added PUT and DELETE types
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewapperley committed Sep 28, 2013
1 parent 482055c commit 18ced8c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
Binary file not shown.
4 changes: 3 additions & 1 deletion AFFNetworking/AFFNetworking/AFFNRequest/AFFNRequest.h
Expand Up @@ -36,7 +36,9 @@ typedef NS_ENUM(NSUInteger, AFFNPostType)
{
kAFFNPost,
kAFFNGet,
kAFFNMulti
kAFFNMulti,
kAFFNPut,
kAFFNDelete
};

/*
Expand Down
2 changes: 1 addition & 1 deletion AFFNetworking/AFFNetworking/AFFNRequest/AFFNRequest.m
Expand Up @@ -192,7 +192,7 @@ - (void)generatePOSTRequest

request = [[NSMutableURLRequest alloc] initWithURL:finalURL cachePolicy:_storagePolicy timeoutInterval:_timeoutInterval];

[request setHTTPMethod:@"POST"];
[request setHTTPMethod:_type == kAFFNPost ? @"POST" : _type == kAFFNPut ? @"PUT" : @"DELETE"];

NSMutableData *data = [NSMutableData new];

Expand Down
Binary file modified Product/ADD_TO_PROJECT/AFFNetworking.zip
Binary file not shown.

0 comments on commit 18ced8c

Please sign in to comment.