Add request body with json

This commit is contained in:
Sambo Chea 2021-03-07 10:56:33 +07:00
parent 50bb10a78f
commit 392872c9f6
2 changed files with 28 additions and 0 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

View File

@ -13,6 +13,34 @@ The application will run at port 8080 with exposed host port (the left one).
### Testing
Try to test export charts data with export server that we running above.
Example request body (json)
```json
{
"infile": {
"title": {
"text": "Income"
},
"xAxis": {
"categories": [
"01-03-2021",
"02-03-2021",
"03-03-2021"
]
},
"series": [
{
"data": [
100.00,
250.50,
500.00
]
}
]
}
}
```
Try example demo server
```shell
curl -H "Content-Type: application/json" -X POST -d '{"infile":{"title": {"text": "Income"}, "xAxis": {"categories": ["01-03-2021", "02-03-2021", "03-03-2021"]}, "series": [{"data": [100.00,250.50,500.00]}]}}' http://charts-exporter.osa.cubetiqs.com -o exported.png
```