Honestly, I don't know a lot about PHP but I think what I need to do is relatively simple.
I'm using ASIHTTPRequest http://allseeing-i.com/ASIHTTPRequest/ in an iOS app. I simply need to add code to my PHP script that will make the request fail, therefore calling the requestFailed delegate method of ASI. I would assume this is with an HTTP Response code but everything I've tried results int he request succeeding. I'm sure I'm doing something wrong but I don't really know PHP.
I've tried
trigger_error("error yo", E_USER_ERROR);
die;
As well as
header("HTTP/1.0 404 Not Found");
die;
I ended up using this
header('HTTP/1.1 401 Unauthorized');
Turns out ASI doesn't handle most HTTP Response codes except authentication and moved.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With