Added API commands

This commit is contained in:
Simon
2018-07-15 21:21:57 -04:00
parent 8a19fa0ce7
commit 0227684a53
6 changed files with 85 additions and 173 deletions

View File

@@ -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)