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

esilver picture esilver · Apr 22, 2011 · Viewed 23.2k times · Source

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?

Answer

Matthew Gillingham picture Matthew Gillingham · Apr 22, 2011

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?