mirror of
https://github.com/simon987/od-database.git
synced 2025-12-14 07:09:03 +00:00
Added API commands
This commit is contained in:
11
debug_put.py
11
debug_put.py
@@ -3,17 +3,16 @@ import json
|
||||
|
||||
|
||||
payload = json.dumps({
|
||||
"token": "4eafc6ed-74b7-4f04-9d34-7f3e01201003",
|
||||
"website_id": 3,
|
||||
# "url": "ftp://132.249.213.137",
|
||||
"url": "http://localhost:8000/",
|
||||
# "url": "http://dlst18.xyz/
|
||||
# dl/vip/film/",
|
||||
"priority": 2,
|
||||
"callback_type": "",
|
||||
"callback_args": "{}"
|
||||
})
|
||||
|
||||
r = requests.post("http://localhost:5001/task/put",
|
||||
headers={"Content-Type": "application/json",
|
||||
"Authorization": "Token abc"},
|
||||
r = requests.post("http://localhost/api/task/enqueue",
|
||||
headers={"Content-Type": "application/json"},
|
||||
data=payload)
|
||||
print(r)
|
||||
print(r.text)
|
||||
|
||||
Reference in New Issue
Block a user