| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- import requests
- import json
- url = 'http://172.17.0.1:8666/CalculateFeatures/'
- data = {
- "data":[
- {
- "index": 1,
- "value": 503
- },
- {
- "index": 2,
- "value": 519
- },
- {
- "index": 2,
- "value": 527
- },
- {
- "index": 3,
- "value": 509
- },
- {
- "index": 3,
- "value": 527
- },
- {
- "index": 4,
- "value": 558
- },
- {
- "index": 5,
- "value": 552
- },
- {
- "index": 6,
- "value": 576
- }
- ],
- "start_index":None,
- "end_index":None
- }
- json_data = json.dumps(data)
- headers = {
- 'Content-Type': 'application/json'
- }
- response = requests.post(url, headers=headers, data=json_data)
- if response.status_code == 200:
- print(response.json())
- else:
- print(f"Error: {response.text}")
|