【发布时间】:2014-01-06 16:41:59
【问题描述】:
我正在使用一个只能在 android 和浏览器上正常工作的网络服务器。
在 iOS 上我收到错误 500(内部服务器错误)
我应该在请求标头中添加任何参数吗?
(void) weatherWS:(WSManagerDelegate*)delegate withUserId:(NSString*)userId withCurrentLanguage:(NSString*)currentLanguage{
NSURL *url = [NSURL URLWithString:_urlString];
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
[request setDidFinishSelector:@selector(requestSuccessCallBack:)];
[request setDidFailSelector:@selector(requestFailedCallBack:)];
int tag = [self _getRequestTag];
if (delegate) {
[_delegatesDictionary setObject:delegate forKey:[NSString stringWithFormat:@"%d",tag]];
}
[request setTag:tag];
[request setRequestMethod:@"GET"];
[request setTimeOutSeconds:60];
[request setDelegate:self];
[request startAsynchronous];
}
request.responseStatusCode 始终为 500(内部服务器错误)
【问题讨论】:
-
你的服务器上应该有一些日志。
-
你使用的是查询字符串参数吗?
-
我无权访问服务器的日志
-
ASIHTTPRequest 也不是很过时吗?
-
@Carlos487 实际上是的,我有一些参数要发送
标签: ios objective-c web-services internal-server-error http-error