Post
import requests
headers = {
'Content-Type': 'application/json',
}
params = (
('userToken', '4oceb92f1sc6p66cf0svrgsoro'),
)
data = '{"sensorId":"58ff93867be12b532d5053f9", "captureTypeName": "IngresoPersonas", "value":"10", "captureDate":"2017-06-09 5:35:30"}'
requests.post('https://bucket.usantotomas.edu.co:8443/api/sensors/58ff93867be12b532d5053f9/captures', headers=headers, params=params, data=data)
#NB. Original query string below. It seems impossible to parse and
#reproduce query strings 100% accurately so the one below is given
#in case the reproduced version is not "correct".
- requests.post('https://bucket.usantotomas.edu.co:8443/api/sensors/58ff93867be12b532d5053f9/captures?userToken=4oceb92f1sc6p66cf0svrgsoro', headers=headers, data=data)
page revision: 0, last edited: 10 Jun 2017 01:07