Reputation: 5644
When querying a website I get the following response:
{ status code: 200, headers {
"Cache-Control" = "no-store, no-cache, must-revalidate, post-check=0, pre-check=0";
Connection = "keep-alive";
"Content-Encoding" = gzip;
"Content-Type" = "application/json; charset=UTF-8";
Date = "Tue, 15 Apr 2014 13:35:20 GMT";
Expires = "Thu, 19 Nov 1981 08:52:00 GMT";
Pragma = "no-cache";
Server = nginx;
"Set-Cookie" = "SESSID=kvccccc; expires=Sat, 14-Jun-2014 13:35:20 GMT; Max-Age=5184000; path=/; domain=.xxxxxxxx.com; HttpOnly";
"Transfer-Encoding" = Identity;
Vary = "Accept-Encoding";
"X-Powered-By" = "PHP/5.5.10";
} }
and the following data in the body:
{"status":"redirect","url":"\/terminal"}
What kind of redirection is this? I thought redirection has a status code beginning with a 3
. In my case, I get a status code of 200
. How should I handle this response in my app?
BTW: I am developing an iOS / Mac OS X app using Objective-C.
Upvotes: 0
Views: 3432
Reputation: 10698
The webservice is returning this in the body: it's not part of the header. In fact, you get a 200 OK from the server, there's no real redirection here.
So, you should treat it as usual data.
Upvotes: 1