How I fetch allHTTPHeaderFields in AFNetworking 3.0

81 views Asked by At

I am migrating my code from AFNetworking 2.x to 3.0.

In AFNetworking 2.x

AFHTTPRequestOPeration *requestOperation;
self.formHash = requestOperation.request.allHTTPHeaderFields[@"FormHash"];

Would anyone help me to implement what is the alternative to fetch allHTTPHeaderFields in AFNerworking 3.0

1

There are 1 answers

0
安Alex On

You can use it like this : NSDictionary fields = ((NSHTTPURLResponse)response).allHeaderFields;