You are posting the JSON data using curl. So add this header to let the server know you are sending JSON.
-H "Content-Type: application/json"
Also, if you are using from windows, then use double quote("
) around the JSON. For example
-d "{test:\"value\"}"
If you have problem with secure connection(https
) then use this parameter as well.
-k