Open TimUnderhay opened 3 years ago
This is the URL that is being called by the plugin:
/test?time1=1618424054&time2=1619028854&time1=1618424054&time2=1619028854
That looks weird indeed 🤔 I'll try to troubleshoot this in the coming days. Thanks for reporting!
I had a deep-ish look at this myself. I don't think the problem is in your code -- I think it's the underlying Grafana fetch function that has a bug. When the request gets handed off to getBackendSrv().fetch(req)
, the query params all seem to be correct.
I've just discovered an interesting problem (using version 1.1.1): all query parameters specified in the query params tab arrive at my REST API wrapped in an array, with a double value (edit: not actually wrapped in an array: each query param is listed twice). For example:
With a simple node express app, if I dump the request query params to the console, this is what shows up:
Yields: