mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-04-21 10:54:31 +08:00
Add PATCH method
This commit is contained in:
@@ -38,7 +38,8 @@ typedef enum RKRequestMethod {
|
||||
RKRequestMethodPOST,
|
||||
RKRequestMethodPUT,
|
||||
RKRequestMethodDELETE,
|
||||
RKRequestMethodHEAD
|
||||
RKRequestMethodHEAD,
|
||||
RKRequestMethodPATCH
|
||||
} RKRequestMethod;
|
||||
|
||||
NSString *RKRequestMethodNameFromType(RKRequestMethod);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user