Hi everyone,
I’m in trouble with the setting of the “raw” body of a POST request.
I wrote the raw request body like this
{
"Geodata":{
"dataset":[
{
"geoJson":{
"coordinates":["{{coordinates}}"],
"type":"{{type}}",
"properties":{
"prop1":"{{prop1}}",
"prop2":"{{prop2}}"
}
}
}
]
},
"date":"{{date}}"
}
With the request I need to send from 1 to n polygons, with their own set of coordinates.
I want to send this json through collection runner
[
{
"Geodata": {
"dataset": [
{
"geoJson": {
"coordinates": [
[
[
11.211549007623518,
46.07882993476238
],
[
11.210692548633489,
46.07882993476238
],
[
11.210692548633489,
46.078536845535325
],
[
11.211549007623518,
46.078536845535325
],
[
11.211549007623518,
46.07882993476238
]
]
],
"type": "Polygon",
"properties": {
"prop1": "null",
"prop2": "TEST"
}
}
}
]
},
"date": "2024-03-27T00:00:00"
}
]
but I get this error
{"error":"BAD_REQUEST","timestamp":"2024-03-29T10:34:19.074182","message":"XXXXX` from Array value (token `JsonToken.START_ARRAY`)\n at [Source: (org.springframework.util.StreamUtils$NonClosingInputStream); line: 2, column: 19] (through reference chain: XXXXX.","status":"BAD_REQUEST"}
While, if I send normally the json as a single POST with that json directly in the body of the request, it works.
Can someone help me with this problem? I don’t understand if the problem is the raw body, the json, the collection runner o something else. The json seems to be ok, without any error.
Thanks a lot!