不确定这是一个错误还是我遗漏了一些东西,很可能是后者。我的 AFHTTPClient 的基本网址是:
#define kBaseURL @"http://localhost:4567/api/"
self.client = [[AFHTTPClient alloc] initWithBaseURL:[NSURL URLWithString:kBaseURL]];
例如,当我发出请求时'/games',它实际上将请求发送到http://localhost:4567/games忽略 API 部分。