Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/105.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 使用ASIHTTPRequest或ASIFormDataRequest设置标头_Ios_Iphone_Http Headers_Asihttprequest_Asiformdatarequest - Fatal编程技术网

Ios 使用ASIHTTPRequest或ASIFormDataRequest设置标头

Ios 使用ASIHTTPRequest或ASIFormDataRequest设置标头,ios,iphone,http-headers,asihttprequest,asiformdatarequest,Ios,Iphone,Http Headers,Asihttprequest,Asiformdatarequest,我想使用ASI设置标题,我为它编写了以下代码,但它不起作用。请帮忙 提前谢谢 我的代码是: ASIHTTPRequest *headReq=[ASIHTTPRequest requestWithURL:url]; [headReq addRequestHeader:@"Authorization" value:encodedData]; 我开始研究你的问题的解决方案,但我看到的很多是。ASIHTTP不再受开发人员支持或推荐,不要在新代码中使用它。来自ASIHTTP网站:“请

我想使用ASI设置标题,我为它编写了以下代码,但它不起作用。请帮忙

提前谢谢

我的代码是:

     ASIHTTPRequest *headReq=[ASIHTTPRequest requestWithURL:url];
     [headReq addRequestHeader:@"Authorization" value:encodedData];

我开始研究你的问题的解决方案,但我看到的很多是。ASIHTTP不再受开发人员支持或推荐,不要在新代码中使用它。来自ASIHTTP网站:“请注意,我不再使用此库-您可能需要考虑在新项目中使用其他内容。”。