How to check the NSDATA type?

In delegate method of NSURLConnection, you can get header of response, from which you can get content type. If content type is set correctly from server, you will get content type in response over here correctly.

Up vote 1 down vote favorite share g+ share fb share tw.

I have the class which downloads images First I have NSMutable URLRequest than I establish NSURLConnection and than I want to check which data I received in this function - (void)connectionDidFinishLoading:(NSURLConnection *)connection If it is image than write to the folder when it is some text than skip to the next image. How do I check the type of received data? Uiimage nsurlconnection nsdata nsmutableurlrequest link|improve this question edited Jun 28 '11 at 13:23Soner Gönül3,84411542 asked Jun 28 '11 at 13:18Rouslan Karimov917 58% accept rate.

In delegate method of NSURLConnection, you can get header of response, from which you can get content type. If content type is set correctly from server, you will get content type in response over here correctly. - (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response{ NSDictionary *dicFields = response allHeaderFields; }.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions