in src/datasource.ts [511:530]
private fetch(
method: string,
postfix: string,
body: any,
showSuccessAlert = false,
showErrorAlert = false
): Observable<FetchResponse> {
const request: BackendSrvRequest = {
url: this.getUrl(postfix),
method,
headers: HEADERS,
showSuccessAlert: showSuccessAlert,
showErrorAlert: showErrorAlert,
};
if (body != null) {
request.data = body;
}
return from(getBackendSrv().fetch(request));
}