我有一个RestKit请求如下。如何从响应头中获取身份验证令牌?
-inkey privkey.pem \
-out keystore.p12 \
-name tomcat \
-CAfile chain.pem \
-caname root
答案 0 :(得分:2)
您可以像这样从RKObjectRequestOperation
获取响应标头。
if let operation = operation, let headers = operation.httpRequestOperation.response.allHeaderFields as? [String:Any] {
print(headers)// Now use subscript with headers dictionary to get your token value
}