Custom headers per request in RestKit

╄→гoц情女王★ 提交于 2019-12-13 06:26:08

问题


I am trying to submit a request to the server,using RestKit 0.20.3 which needs different headers depending on some state of the application

i read these posts : question1 question2

and they don't help, because this api is not available

how do i add custom headers to RestKit's url requests ?


回答1:


Question 2 is the correct technique, you just need to use the new API:

request = [objectManager requestWithObject: method: path: parameters:];

Then create the operation:

operation = [objectManager objectRequestOperationWithRequest: success: failure:];

Then push for execution:

[objectManager enqueueObjectRequestOperation:];


来源:https://stackoverflow.com/questions/21115565/custom-headers-per-request-in-restkit

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!