Add request body with json
This commit is contained in:
parent
50bb10a78f
commit
392872c9f6
28
README.md
28
README.md
@ -13,6 +13,34 @@ The application will run at port 8080 with exposed host port (the left one).
|
|||||||
|
|
||||||
### Testing
|
### Testing
|
||||||
Try to test export charts data with export server that we running above.
|
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
|
```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
|
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
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user