Created
June 1, 2021 07:40
-
-
Save raghavddps2/b6f7d5fde47d158f518d7dbc9ad1eff9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests | |
| def maskDataUpdate(): | |
| url = "localhost:5000/realtimeMask" | |
| payload = { | |
| "people_with_mask":20, | |
| "people_without_mask":14 | |
| } | |
| payload=str(payload) | |
| headers = { | |
| 'Content-Type': 'application/json' | |
| } | |
| response = requests.request("PUT", url, headers=headers, data=payload) | |
| print(response.text) | |
| def trafficDataDemo(): | |
| url = "localhost:5000/realtimeTraffic" | |
| payload= { | |
| "bus_count":10, | |
| "car_count":20, | |
| "heavy_vehicle_count":30, | |
| "pedestrian_count":40, | |
| "other_vehicle_count":50, | |
| "total_people_count":60, | |
| "total_vehicle_count":70 | |
| } | |
| headers = { | |
| 'Content-Type': 'application/json' | |
| } | |
| response = requests.request("PUT", url, headers=headers, data=payload) | |
| print(response.text) | |
Author
raghavddps2
commented
Jun 1, 2021
- Backend API 1 - https://secure-basin-28765.herokuapp.com
- Backend API 2 - https://fathomless-brook-87233.herokuapp.com
- Frontend Application - https://fyp-frontend-blue.vercel.app
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment