zijianhuang / webapiclientgen

Strongly Typed Client API Generators generate strongly typed client APIs in C# .NET and in TypeScript for jQuery and Angular 2+ from ASP.NET Web API and .NET Core Web API
MIT License
167 stars 38 forks source link

Promise<AxiosResponse<Blob>> is not working well in React Babel #131

Open zijianhuang opened 1 year ago

zijianhuang commented 1 year ago
        getTextStream(headersHandler?: () => {[header: string]: string}): Promise<AxiosResponse<Blob>> {
            return Axios.get(this.baseUri + 'api/SuperDemo/TextStream', { headers: headersHandler ? headersHandler() : undefined, responseType: 'blob' }).then(d => d.data);
        }

working well in Vue TS and Axios with jest, but in React, the promise return empty object.

not sure if this is some defect in my end, or Babel had done something improperly?

related to #60