From df06d13cf8f9e4ea71a22057af12e570ff3e98d4 Mon Sep 17 00:00:00 2001 From: ilike2burnthing <59480337+ilike2burnthing@users.noreply.github.com> Date: Fri, 12 Jan 2024 23:38:18 +0000 Subject: [PATCH] Update README.md --- README.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1aada89..b5208fc 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,7 @@ We provide an example Systemd unit file `flaresolverr.service` as reference. You ## Usage -Example request: +Example Bash request: ```bash curl -L -X POST 'http://localhost:8191/v1' \ -H 'Content-Type: application/json' \ @@ -100,6 +100,21 @@ curl -L -X POST 'http://localhost:8191/v1' \ }' ``` +Example Python request: +```py +import requests + +url = "http://localhost:8191/v1" +headers = {"Content-Type": "application/json"} +data = { + "cmd": "request.get", + "url": "http://www.google.com/", + "maxTimeout": 60000 +} +response = requests.post(url, headers=headers, json=data) +print(response.text) +``` + ### Commands #### + `sessions.create`