Skip to content

Commit

Permalink
post
Browse files Browse the repository at this point in the history
  • Loading branch information
chamspan committed May 13, 2015
1 parent 031980a commit f8b6158
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions iLcatraz/HTTPConnectionIL.m
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ + (NSString*) sanitizePID:(NSString*) pid{
/*
/media/tracks/ID
*/
if ([method isEqualToString:@"PATCH"]){
if ([method isEqualToString:@"PATCH"] || [method isEqualToString:@"POST"]){
NSData *data = [request body];
NSString *str = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];

Expand Down Expand Up @@ -208,12 +208,12 @@ + (NSString*) sanitizePID:(NSString*) pid{
}
}

if ([method isEqualToString:@"GET"] || [method isEqualToString:@"PATCH"]) {
if ([method isEqualToString:@"GET"] || [method isEqualToString:@"PATCH"] || [method isEqualToString:@"POST"]) {
NSString *trackPath=[service pathForTrackWithID:tid];
trackLocation=[service locationForTrackPath:trackPath];
ret=[service jsonTrackWithID:tid];
}else {
return [[RESTResponse alloc] initWithJSON:@"Only GET and PATCH methods are allowed to this resource" andStatus:400];
return [[RESTResponse alloc] initWithJSON:@"Only GET and PATCH(POST) methods are allowed to this resource" andStatus:400];
}
}else{
/*
Expand Down

0 comments on commit f8b6158

Please sign in to comment.