Skip to content

Instantly share code, notes, and snippets.

@AbdulRafay
Last active February 11, 2020 17:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AbdulRafay/eb8a3dd459df2e1b6c61d1edaf92daeb to your computer and use it in GitHub Desktop.
Save AbdulRafay/eb8a3dd459df2e1b6c61d1edaf92daeb to your computer and use it in GitHub Desktop.
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