From 7e9a6fd598d0f62f84e9461aa847f5f19abe32d4 Mon Sep 17 00:00:00 2001 From: Yannik Schmidt Date: Thu, 6 Jan 2022 11:38:17 +0100 Subject: [PATCH] add native python client example --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 9694afa..d950c9b 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,11 @@ For example: -H "application/json" \ -d "{ "service_name" : "name", "token" : "secret_token" } \ https://server:port/ + +Or directly in native python: + + import requests + requests.post("https://server:port/", json={"service_name" : "name", "token" : "secret_token" }) ## Icinga (Serverside) Requests Use the [python-script]() as a command to execute, you can pass *protocol*, *host*, *port* and *service\_name* as arguments.