Last active
February 11, 2020 17:20
-
-
Save AbdulRafay/eb8a3dd459df2e1b6c61d1edaf92daeb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
# defining the api-endpoint | |
API_ENDPOINT = "https://entke6c4912e.x.pipedream.net" | |
predi = "{'data': 'awesome predication'}" | |
# data to be sent to api | |
data = json.dumps(predi) | |
# sending post request and saving response as response object | |
r = requests.post(url=API_ENDPOINT, data=data) | |
# extracting response text | |
print("returned data is:%s" % r.text) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment