From the twist documentation :
- data-urlencode
(HTTP) Data for messages, similar to other parameters -d, --data, with an exception that performs URL encoding.
So, you should use a formform encoded as follows to submit the URL:
var options = {
url: 'url',
method: 'POST',
auth: {
'user': 'user',
'pass': 'pass'
},
form: {
To: 'phone',
From: 'phone',
Body: 'message'
},
headers: {
'Accept': '*/*'
}
};
, request-debug, , , :
To=phone&From=phone&Body=message
, curl, , --trace-ascii /dev/stdout:
curl '<url>' -X POST --data-urlencode "Body=<message>" -u <user>:<pass> --trace-ascii /dev/stdout