4ma*_*oud 1 url json objective-c ios
我正在开发一款利用Google搜索API并搜索阿拉伯语内容的iPhone应用程序.
每当我发送包含URL中的阿拉伯字母的请求以获取JSON文件格式时,我收到错误消息表明请求失败.这是请求的样子:
https://www.googleapis.com/customsearch/v1?oe=utf-8&ie= ISO-8859-6&key=[MY KEY]&cx=013036536707430787589:_pqjad5hr1a&q=????&alt=json
这是我的代码中调用请求并检索数据的方法:
NSURLConnection *connection = [[NSURLConnection alloc]initWithRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"https://www.googleapis.com/customsearch/v1?oe=utf-8&ie= ISO-8859-6&key=[MY KEY]&cx=013036536707430787589:_pqjad5hr1a&q=????&alt=json"]] delegate:self];
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
2615 次 |
最近记录: |