How to send from data from custom plugin

Hi
I’m developing 2 plugins for Grafana.
Plugin 1 is a custom data source that fetches data from a custom API, and the second is a UI representation for this data.
The UI plugin requires a form that updates some server-side data.
Currently, I’m implementing it with a fetch() request.
Is there a way to do that using the custom data source?
can I send form data via Grafana data source?

Thanks

Hi @ilibilibom,

As far as I see, datasource has a datasourceRequest() method. It may be used to POST form data probably. Some kind of:

let options: any = {
  "POST",
  url: "YOUR_URL",
  data: YOUR_FORM_DATA
};

const response = await this.backendSrv.datasourceRequest(options);
const responseData = response.data;

Regards,
V.

Thanks @vsergeyev - I’ll give it a try