iphone - ios get the headers from NSURLRequest I get error [NSConcreteMutableData allHeaderFields]: unrecognized selector -


i'm trying headers of nsurlrequest following line:

nsstring *contenttype = [[(nshttpurlresponse *)data allheaderfields] valueforkey:@"content-type"]; 

but i'm getting following error:

-[nsconcretemutabledata allheaderfields]: unrecognized selector sent instance 0x8d876e0  *** terminating app due uncaught exception 'nsinvalidargumentexception', reason: '-[nsconcretemutabledata allheaderfields]: unrecognized selector sent instance 0x8d876e0' 

any of guys know why of error or how can fixed or i'm doing wrong?

i'll appreciate help

data nsdata instance, not nshtturlresponse think.

that's why doesn't recognize selector allheaderfields you're sending it.


Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

C# WinForm - loading screen -