Created
November 28, 2018 19:47
-
-
Save nix2intel/d3cd4cff0af4351850cd3d18a8b2bd15 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
def send_request(): | |
# Sensor-Set | |
# GET https://api.protectwise.com/api/v1/sensor-sets | |
token = "tokenhere" | |
try: | |
response = requests.get( | |
url="https://api.protectwise.com/api/v1/sensor-sets", | |
headers={ | |
"X-Access-Token": token, | |
}, | |
) | |
print('Response HTTP Status Code: {status_code}'.format( | |
status_code=response.status_code)) | |
print('Response HTTP Response Body: {content}'.format( | |
content=response.content)) | |
except requests.exceptions.RequestException: | |
print('HTTP Request failed') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment