Laravel API throws FileNotFoundException when accessed through an android app -
i'm working on api using laravel 5.2. have disabled csrf token commenting \app\http\middleware\verifycsrftoken::class
in kernel.php
. if access api postman works charm when using android app filenotfoundexception
. please help. can post code , other details if want. in advance.
sorry issue on android side not on laravel. resolved now.
the issue was setting http codes myself in laravel. problem if set code in range 4xx( 404), android consider error , show filenotfoundexception
, neglect stream in connection. changing getinputstream
geterrorstream
resolved problem. geterrorstream
reads stream if response code kind of error 404,422 ,etc. hope explanation sufficient.
Comments
Post a Comment