如何基于此卷曲设置授权令牌? [英] how to set the authorization token based on this curl?
本文介绍了如何基于此卷曲设置授权令牌?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想为标题添加授权的令牌。这里是我的后端要求我在任何互动之前设置的卷曲:
I want add a token for Authorisation to the header. Here it is the curl that my backend ask me to set before any interaction:
curl -H 'Authorization: Token token="replace-with-token"' http://domain.com/topic
这里是我的代码:
[config setHTTPAdditionalHeaders:@{@"Authorization":@"token=\"4959a0bc00a15e335fb6\""}];
我不断收到HTTP令牌:访问被拒绝。是否有任何一个知道原因?
I keep getting "HTTP Token: Access denied." does any one know reason?
推荐答案
我相信会是这样的:
[config setHTTPAdditionalHeaders:@{@"Authorization":@"Token token=\"4959a0bc00a15e335fb6\""}];
这篇关于如何基于此卷曲设置授权令牌?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文