BackendSrv: support binary responseType like $http did (#29004)

This commit is contained in:
Ryan McKinley
2020-11-18 09:35:28 -08:00
committed by GitHub
parent 1895626080
commit d85d547ab3
4 changed files with 84 additions and 9 deletions

View File

@@ -61,6 +61,15 @@ export type BackendSrvRequest = {
*/
params?: Record<string, any>;
/**
* Define how the response object should be parsed. See:
*
* https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Sending_and_Receiving_Binary_Data
*
* By default values are json parsed from text
*/
responseType?: 'json' | 'text' | 'arraybuffer' | 'blob';
/**
* The credentials read-only property of the Request interface indicates whether the user agent should send cookies from the other domain in the case of cross-origin requests.
*/