Skip to content

Type 'void' is not assignable to type 'AxiosHeaders...' #4

Open
@shaon72

Description

@shaon72

No overload matches this call. Overload 1 of 2, '(config: AxiosRequestConfig<any>): Promise<AxiosResponse<any, any>>', gave the following error. Type 'void' is not assignable to type 'AxiosHeaders | (Partial<RawAxiosHeaders & { Accept: AxiosHeaderValue; "Content-Length": AxiosHeaderValue; "User-Agent": AxiosHeaderValue; "Content-Encoding": AxiosHeaderValue; Authorization: AxiosHeaderValue; } & { ...; }> & Partial<...>) | undefined'. Overload 2 of 2, '(url: string, config?: AxiosRequestConfig<any> | undefined): Promise<AxiosResponse<any, any>>', gave the following error. Argument of type '{ method: Method; url: string; data: any; headers: void; }' is not assignable to parameter of type 'string'.ts(2769) index.d.ts(312, 3): The expected type comes from property 'headers' which is declared here on type 'AxiosRequestConfig<any>'

The setHeader function at /frontend/src/utils/request-service.tsx seems to be causing this issue @merikbest

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions