feature: allow delete request to accept body (#39817)

This commit is contained in:
An authored and GitHub committed 2021-09-30 10:59:53 -04:00
1 parent 451d023c79
commit fffbdf4c82
2 files changed
+3 -3

No files matched your search

@@ -140,7 +140,7 @@ export interface FetchError<T extends FetchErrorDataProps = any> {
*/
export interface BackendSrv {
get(url: string, params?: any, requestId?: string): Promise<any>;
delete(url: string): Promise<any>;
delete(url: string, data?: any): Promise<any>;
post(url: string, data?: any): Promise<any>;
patch(url: string, data?: any): Promise<any>;
put(url: string, data?: any): Promise<any>;
+2 -2
View File
@@ -385,8 +385,8 @@ export class BackendSrv implements BackendService {
return await this.request({ method: 'GET', url, params, requestId });
}
async delete(url: string) {
return await this.request({ method: 'DELETE', url });
async delete(url: string, data?: any) {
return await this.request({ method: 'DELETE', url, data });
}
async post(url: string, data?: any) {