Skip to content
Snippets Groups Projects
Commit de2c31db authored by Callum Inglis's avatar Callum Inglis
Browse files

Add API Authentication

parent 62154b3c
No related branches found
No related tags found
3 merge requests!4Api authentication,!3Api authentication,!2Api authentication
This commit is part of merge request !4. Comments created here will be created in the context of that merge request.
...@@ -86,6 +86,7 @@ class SensorResponse(object): ...@@ -86,6 +86,7 @@ class SensorResponse(object):
headers = {'Content-Type': 'Application/json'} headers = {'Content-Type': 'Application/json'}
response = requests.post(API_URL + '/sensor/reading', data=self.ToJson(), headers=headers)#, verify=False) # Using self signed cert for now, sort later! response = requests.post(API_URL + '/sensor/reading', data=self.ToJson(), headers=headers)#, verify=False) # Using self signed cert for now, sort later!
if DEBUG > 1: if DEBUG > 1:
print(self.ToJson())
print(response) # Ensure 200 Response! print(response) # Ensure 200 Response!
return return
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment