As I mentioned at title. I use the following command in Windows 7 console with curl 7.51.0, the curl command return Bad Requests message to me:
curl -X POST -H "Content-Type: application/json" -d '{"value1":"www.google.com"}' https://maker.ifttt.com/trigger/{MyChannel}/with/key/{MyKey}
It's quiet weird because I sent the command in my ubuntu VMware development environment (curl v7.35.0), the command reply OK, IFTTT action work well.
Also, I use the chrome plugin - Advanced REST client(ARC) to send the web request, it also reply OK, and IFTTT action work well.
Could anyone explain what's wrong with my curl application?
I've found the answer by myself. Base on by test result below, if I changed my command as :
curl -X POST -H "Content-Type: application/json" -d {\"value1\":\"www.google.com\"} https://maker.ifttt.com/trigger/{MY_EVENT_NAME}/with/key/{MY_SLACK_API_KEY}
Then I would get a OK reply from IFTTT :
Congratulations! You've fired the {MY_EVENT_NAME} event
as you can see in the modified command, I've removed the single quotation marks embraced the json data and add some escape characters (back slash character'\') before double quotation marks.