...
Code Block | ||||
---|---|---|---|---|
| ||||
import requests my_data = {} data = { 'data': {}, 'lat_hg': 0, 'long_carr': 0, 'long_hg': 0, 'time_start': '2016-08-26T06:29:01.424Z' } url = '%(schema)s://%(host)s:%(port)s/%(path)s' properties = { 'schema': 'http', 'host': 'localhost', 'port': '8002', 'path': 'region/myDataset' } headers = {'Content-Type': 'application/json'} res = requests.post(url % properties, headers=headers, json=data) |
...