Add PATCH method

This commit is contained in:
Blake Watters
2012-08-09 17:13:13 -04:00
parent 571909c8b4
commit 2454d38dcc
2 changed files with 8 additions and 1 deletions

View File

@@ -38,7 +38,8 @@ typedef enum RKRequestMethod {
RKRequestMethodPOST,
RKRequestMethodPUT,
RKRequestMethodDELETE,
RKRequestMethodHEAD
RKRequestMethodHEAD,
RKRequestMethodPATCH
} RKRequestMethod;
NSString *RKRequestMethodNameFromType(RKRequestMethod);

View File

@@ -51,6 +51,10 @@ NSString *RKRequestMethodNameFromType(RKRequestMethod method) {
case RKRequestMethodPUT:
return @"PUT";
break;
case RKRequestMethodPATCH:
return @"PATCH";
break;
case RKRequestMethodDELETE:
return @"DELETE";
@@ -78,6 +82,8 @@ RKRequestMethod RKRequestMethodTypeFromName(NSString *methodName) {
return RKRequestMethodDELETE;
} else if ([methodName isEqualToString:@"HEAD"]) {
return RKRequestMethodHEAD;
} else if ([methodName isEqualToString:@"PATCH"]) {
return RKRequestMethodPATCH;
}
return RKRequestMethodInvalid;