La til autentikasjon i klienten
This commit is contained in:
parent
fe9da5ba89
commit
72fb716199
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,2 +1,6 @@
|
||||
### Python ###
|
||||
*__pycache__/
|
||||
|
||||
### Configs ###
|
||||
camera/config.py
|
||||
api/config.py
|
||||
|
@ -20,7 +20,7 @@ else:
|
||||
try:
|
||||
start = time.time()
|
||||
img = {'image': open('latest.jpg', 'rb')}
|
||||
response = requests.post(config.config['uploadurl'], files=img)
|
||||
response = requests.post(config.config['uploadurl'], files=img, headers={'Authorization': 'Basic ' + config.config['key']})
|
||||
end = time.time()
|
||||
except Exception as e:
|
||||
logging.info('Feil under opplasting: {0}'.format(e))
|
||||
|
Loading…
Reference in New Issue
Block a user