bruno
bruno copied to clipboard
Not clear how to send a json array in a get request
Can you explain how to pass the json array in a get request? I tried using online json to query parameter converters but didnt work
I'm having the same problem right now. I configured the filter_group param property but the json is not decoded into array.
In order to get a work around to the problem I did use QueryString library (https://www.npmjs.com/package/qs)
import qs from 'qs'
...
axios.get("/api/v1/endpoint?"+qs.stringify({
filter_groups: [{
filters: [{
key: 'id',
value: 2,
operator: 'eq'
}]
}]
})).then(response => {
console.log(response);
}).catch(function (e) {
this.dispatch('error', e);
}.bind(this));