1👍
✅
You need to either
- Always provide the trailing
/
in yourgetPath:
argument (likegetPath:@"entry/"
), or - Subclass
AFHTTPClient
with a method that adds it.
Here’s an example of #2:
- (void)getPath:(NSString *)path
parameters:(NSDictionary *)parameters
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure
{
if ([path length] > 0 && ![path hasSuffix:@"/"])
path = [path stringByAppendingString:@"/"];
[super getPath:path parameters:parameters success:success failure:failure];
}
Source:stackexchange.com