POST data to REST API using webinject

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
nagios_ant
Posts: 17
Joined: Tue Jul 11, 2017 2:03 am

POST data to REST API using webinject

Post by nagios_ant »

Hi team,
we are using webinject of nagios for testing our webservices (REST)
we were able to test our GET services with the webinject plugin.
We are unable to find a method to test POST method using content type as application/json
Can you suggest any options.
User avatar
tacolover101
Posts: 432
Joined: Mon Apr 10, 2017 11:55 am

Re: POST data to REST API using webinject

Post by tacolover101 »

you should be able to use check_http to verify your JSON endpoints.

an example that was worked through can be found here - https://support.nagios.com/forum/viewto ... 9&start=10 - note that the OP was originally missing -T "application/json"
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: POST data to REST API using webinject

Post by npolovenko »

Thanks, @tacolover101!
@nagios_ant, Let us know if check_http plugin works for you.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked