问题
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