4

I am trying to debug a http get request i sent via AFNetworking's AFJSONRequestOperation to see if the cookies are being sent correctly. However, i dont see any cookies in http header. Can some expert help me out here? thanks! :)

trillions
  • 3,669
  • 10
  • 40
  • 59

1 Answers1

0

You can set the cookie to your AFHTTPClient or it's subclass with the following line

[_httpClient setDefaultHeader:@"Cookie" value:@"cookie=value"];

I've tried this with my server and it works. It can clearly catch the cookie named cookie and it's related value.

amb
  • 4,798
  • 6
  • 41
  • 68