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
FYI, when one makes an API call without setting the content type header
Content-Type: application/x-www-form-urlencoded
the response is a failure with message _Invalid phone number._ I found this out twice, once while using a browser extension based REST client to test out API and again while using XmlHttpRequest while building a browser extension for the API.
Not all HTTP request tools/libraries auto-set content type (to form for POST requests) unlike curl. Granted developer should know to set it, but sometimes we forget. The error returned isn't very useful for debugging. Perhaps in future should enhance to return a proper failure message in this case like
_Content type header not set or wrong type used. Please use application/x-www-form-urlencoded_.
The text was updated successfully, but these errors were encountered:
FYI, when one makes an API call without setting the content type header
Content-Type: application/x-www-form-urlencoded
the response is a failure with message _Invalid phone number._ I found this out twice, once while using a browser extension based REST client to test out API and again while using XmlHttpRequest while building a browser extension for the API.
Not all HTTP request tools/libraries auto-set content type (to form for POST requests) unlike curl. Granted developer should know to set it, but sometimes we forget. The error returned isn't very useful for debugging. Perhaps in future should enhance to return a proper failure message in this case like
_Content type header not set or wrong type used. Please use application/x-www-form-urlencoded_.
The text was updated successfully, but these errors were encountered: