i want use pushbullet api (v2/push) pushing messages, if include '%' character inside title or body server gives me following error:
{"error":{"type":"invalid_request","message":"failed decode urlencoded post form body.","cat":"~(=^‥^)ノ"}}
how can fix problem?
request: curl https://api.pushbullet.com/v2/pushes -k -u token: -d type=note -d title="%test" -d body="%%test" -x post
x-www-form-urlencoded not straightforward of formats. can use curl --data-urlencode option. can try encoding values tool: http://meyerweb.com/eric/tools/dencoder/
that should produce urlencoded output, instance request more like:
curl -u token: https://api.pushbullet.com/v2/pushes --header "content-type: application/x-www-form-urlencoded" --data-binary 'type=note&title=titletext&body=%25bodytext'
Comments
Post a Comment