Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are the HTTP status codes defined anywhere in the iOS SDK?

Does anyone know if/where the HTTP status codes, as specified here, are defined in the iOS SDK? Or should I expect to manually re-define them in a constants file?

like image 548
esilver Avatar asked Apr 22 '11 04:04

esilver


People also ask

How do I find HTTP status code?

Just use Chrome browser. Hit F12 to get developer tools and look at the network tab. Shows you all status codes, whether page was from cache etc.

How many HTTP status codes are there?

The value of HTTP status codes There are 16 status codes defined in RFC1945 (the HTTP 1.0 specification). These status codes were motivated by pragmatism. Web browsers are generic, in that they can be used to talk to any web server.

What is HTTP status code not found?

If the server does not know, or has no facility to determine, whether or not the condition is permanent, the status code 404 (Not Found) SHOULD be used instead.


1 Answers

Well, they are defined in the sense that

[NSHTTPURLResponse localizedStringForStatusCode:(NSInteger)statusCode] 

can return a string for the given status code. Is that what you are looking for?

like image 84
Matthew Gillingham Avatar answered Sep 28 '22 13:09

Matthew Gillingham