You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just want to mention that some APIs return error codes 400 or greater. A response message is returned by the API which would be useful, (in this instance the http code was 400 and the error was an xml string), but because of the CURLOPT_FAILONERROR (which defaults to true for simpleget and can not be changed via that call), the response from the curl class is FALSE.
I figured this out pretty quickly and created a custom request:
That was very helpful. I too would like to be able to pass in that FAILONERROR option. I tried it with the simple_get but couldn't get it to work properly. I may have misread Phil's docs, but I thought I would have been able to pass in an array of options to a simple_get. The 'long hand' method you stated above does the trick though.
Just want to mention that some APIs return error codes 400 or greater. A response message is returned by the API which would be useful, (in this instance the http code was 400 and the error was an xml string), but because of the CURLOPT_FAILONERROR (which defaults to true for simpleget and can not be changed via that call), the response from the curl class is FALSE.
I figured this out pretty quickly and created a custom request:
So that works, and it's simple. This perhaps should be noted in the README, or a second param with options could be available for simple_get.
The text was updated successfully, but these errors were encountered: