19 lines
406 B
Python
19 lines
406 B
Python
import requests
|
|
import json
|
|
|
|
url = "https://tl.fabelous.app/api/rogQxDpALQdFDEYihACT/"
|
|
headers = {
|
|
"Authorization": "Token yQfZjxLCWYZQXTjepQAm",
|
|
"Content-Type": "application/json"
|
|
}
|
|
data = {
|
|
"message": "Hello, world!",
|
|
"from": "en",
|
|
"to": "de"
|
|
}
|
|
|
|
response = requests.post(url, headers=headers, data=json.dumps(data))
|
|
|
|
print(response.status_code)
|
|
print(response.text)
|