Update README.md

This commit is contained in:
ilike2burnthing 2024-01-12 23:38:18 +00:00 committed by GitHub
parent 993b8c41ac
commit df06d13cf8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -89,7 +89,7 @@ We provide an example Systemd unit file `flaresolverr.service` as reference. You
## Usage ## Usage
Example request: Example Bash request:
```bash ```bash
curl -L -X POST 'http://localhost:8191/v1' \ curl -L -X POST 'http://localhost:8191/v1' \
-H 'Content-Type: application/json' \ -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 ### Commands
#### + `sessions.create` #### + `sessions.create`