如何在 NSURLRequest 中使用身份验证令牌
我正在使用带有 REST API 的服务,它为我提供身份验证令牌作为登录 POST 请求的响应。
现在,为了对每个请求进行身份验证,我需要随请求发送该令牌。 如何在我发送到服务器的每个请求中使用此令牌???
I'm using a service with REST API, which provides me an authentication token as the response for the sign in POST request.
Now for authentication on every request i need to send that token with the request.
How to use this token with every request i send to server ???
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不完全确定你的问题需要什么,但这是一个猜测。
要对每个其他执行此操作,请执行
if (i % 2 == 0)
或类似的操作。I'm not totally sure what you need from your question, but here is a guess.
And to do this for every other one, do a
if (i % 2 == 0)
or something to that effect.