- Home /
WWW - Can we determine GET response status without reading headers
Hi,
Is there a way to determine whether "new WWW(Url)" returned good HTTP status (2xx) or bad (4XX/5XX) without looking into responseHeaders?
Thank you.
Answer by Landern · May 13, 2015 at 05:47 PM
Nope, the response header is literally where this exists as a KeyValuePair.
Actually AFAI$$anonymous$$ you can customize header with whatever you want. I may be mistaken but the link you showed is a standard which doesn't mean that custom API will return headers as described there.
Yes www.error contains the error code. you would have to parse it as the second part contains some extra info like:
error 403 url malformed
btw this is not an actual error just an example. There might even be a - between the two parts.
On the other hand, www.error is null if no problem, so you cannot get the value if it went fine.