Hello forum,
I have a web scenario where I need to post JSON data.
The manual curl is very easy for that:
curl -X POST -H "Content-Type:application/json" -H "Authorization:Basic <API KEY>" -d "{'MSGSource':'Zabbix','Action':'ping'}" http://www.example.net/API
However I seem to be too stupid to transform this into a web scenario. I added a the two headers:
Content-Type => application/json
Authorization => Basix <API KEY>
And in the first and only step, I entered the json data as "Raw data" in post type like in curl:
{'MSGSource':'Zabbix','Action':'ping'}
However I only get an HTTP 400 error code.
Any advice or hints? Thanks!
I have a web scenario where I need to post JSON data.
The manual curl is very easy for that:
curl -X POST -H "Content-Type:application/json" -H "Authorization:Basic <API KEY>" -d "{'MSGSource':'Zabbix','Action':'ping'}" http://www.example.net/API
However I seem to be too stupid to transform this into a web scenario. I added a the two headers:
Content-Type => application/json
Authorization => Basix <API KEY>
And in the first and only step, I entered the json data as "Raw data" in post type like in curl:
{'MSGSource':'Zabbix','Action':'ping'}
However I only get an HTTP 400 error code.
Any advice or hints? Thanks!
Comment