This file contains hidden or 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 os | |
| // use the internal URL as requests strips authorization headers on redirects | |
| url = "https://thingful-pipes.herokuapp.com/api/run/4e9ce2e7-50b9-4fdb-a491-ff4d6da72700" | |
| // ensure token is set in the environment | |
| token = os.getenv("PIPES_TOKEN") | |
| if token is None: | |
| raise TypeError("PIPES_TOKEN must be set in the environment") |