Skip to content

Commit f8b6158

Browse files
committed
post
1 parent 031980a commit f8b6158

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: iLcatraz/HTTPConnectionIL.m

+3-3
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ + (NSString*) sanitizePID:(NSString*) pid{
179179
/*
180180
/media/tracks/ID
181181
*/
182-
if ([method isEqualToString:@"PATCH"]){
182+
if ([method isEqualToString:@"PATCH"] || [method isEqualToString:@"POST"]){
183183
NSData *data = [request body];
184184
NSString *str = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
185185

@@ -208,12 +208,12 @@ + (NSString*) sanitizePID:(NSString*) pid{
208208
}
209209
}
210210

211-
if ([method isEqualToString:@"GET"] || [method isEqualToString:@"PATCH"]) {
211+
if ([method isEqualToString:@"GET"] || [method isEqualToString:@"PATCH"] || [method isEqualToString:@"POST"]) {
212212
NSString *trackPath=[service pathForTrackWithID:tid];
213213
trackLocation=[service locationForTrackPath:trackPath];
214214
ret=[service jsonTrackWithID:tid];
215215
}else {
216-
return [[RESTResponse alloc] initWithJSON:@"Only GET and PATCH methods are allowed to this resource" andStatus:400];
216+
return [[RESTResponse alloc] initWithJSON:@"Only GET and PATCH(POST) methods are allowed to this resource" andStatus:400];
217217
}
218218
}else{
219219
/*

0 commit comments

Comments
 (0)