-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Some users have reported problems when trying to send API requests to SMSified with older versions of PHP. API is responding with an HTTP 400, but the URL used in the request looks completely normal.
This might be caused by a failure to set the proper HTTP headers on the request. A work around can be implemented by simply adding the appropriate headers via CURLOPT_HTTPHEADER, like so:
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/x-www-form-urlencoded', 'Content-length: 0')); It might be worth adding this to the PHP library, so as to make it more compatible with older version of PHP or hosts where these headers are not added automatically.
Metadata
Metadata
Assignees
Labels
No labels