Debug ASIHTTPRequest

I am using ASIHTTPRequest in my iOS project. I would like to see all the http headers of my request on the server. How can I see this with ASIHTTPRequest?

Is there any tool like a violinist on mac?

thanks for your reply

+3
source share
3 answers

There is a property requestHeaders. This NSMutableDictionaryis why you can go through it. The key dictionary is the name of the header, and the dictionary value for this key is the value of the header with this name.

+1
source

You can also set the following macro, which is located in ASIHTTPRequestConfig.h, I used this to help with debugging HTTP headers.

#define DEBUG_REQUEST_STATUS 1
+3
source

You can simply print them:

// headers in server response 
- (void)requestFinished:(ASIHTTPRequest *)request
{
    NSLog(@"headers: %@", [request responseHeaders]);
}

And to see the headers of your request:

     NSLog(@"headers: %@", [request requestHeaders]);
+1
source

All Articles