Skip to content

Instantly share code, notes, and snippets.

@nix2intel
Created November 28, 2018 19:47
Show Gist options
  • Save nix2intel/d3cd4cff0af4351850cd3d18a8b2bd15 to your computer and use it in GitHub Desktop.
Save nix2intel/d3cd4cff0af4351850cd3d18a8b2bd15 to your computer and use it in GitHub Desktop.
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