Tag: httprequest

POST请求使用application / x-www-form-urlencoded

后端开发人员在POST请求中给出了这些指示信息: 路线:{url} / {app_name / {controller} / {action} 控制器和行动应该在小型大写字母上。 APItesting链接:http: * ** * ** * ** * ** * *** 请求应该使用POST方法。 参数应该通过请求内容体(FormUrlEncodedContent)传递。 参数应该是json格式。 参数是关键敏感的。 在协议中没有5号的经验,我search了,并以我的代码结束。 -(id)initWithURLString:(NSString *)URLString withHTTPMEthod:(NSString *)method withHTTPBody:(NSDictionary *)body { _URLString = URLString; HTTPMethod = method; HTTPBody = body; //set error message errorMessage = @"Can't connect to server at this moment. Try again […]

Xcode 7 / iOS 9中的Api调用错误(如何在plist中设置App Transport安全性)

我正在使用xcode 7testing版本。 现在,我正在开发一个API。 如果,我在Xcode 6.3中使用API​​,它工作正常,但是当我在xcode 7中使用相同的API出现错误消息出现无法parsing。 这里是我使用的API 请帮我一下 提前致谢