README.md aktualisiert

This commit is contained in:
Simon Rieger 2023-11-24 13:57:21 +01:00
parent 62cbd281b0
commit 7679b06276

View file

@ -6,7 +6,7 @@ A simple Go program that handles location data sent via HTTP POST requests and i
- Handles JSON payloads containing location data. - Handles JSON payloads containing location data.
- Inserts location data into a MySQL database. - Inserts location data into a MySQL database.
- Supports parameters `device` and `user` in HTTP requests. - Utilizes headers `X-Limit-U` and `X-Limit-D` for specifying user and device information in HTTP requests.
## Prerequisites ## Prerequisites
@ -86,7 +86,11 @@ Make a POST request with a JSON payload to `http://localhost:8080/?device=your_d
Example: Example:
```bash ```bash
curl -X POST -d '{"_type": "location", "tst": 1637650367, "lat": 37.7749, "lon": -122.4194, "tid": "123", "batt": 90, "vac": 220}' http://localhost:8080/?device=your_device&user=your_user curl -X POST -H "Content-Type: application/json" \
-H "X-Limit-U: your_user" \
-H "X-Limit-D: your_device" \
-d '{"_type": "location", "tst": 1637650367, "lat": 37.7749, "lon": -122.4194, "tid": "123", "batt": 90, "vac": 220}' \
http://localhost:8080/
``` ```
## Contributing ## Contributing
@ -95,4 +99,4 @@ Feel free to open issues or submit pull requests.
## License ## License
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details. This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.