Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error type request header in typescript #5489

Closed
adityaw24 opened this issue Jan 24, 2023 · 3 comments
Closed

Error type request header in typescript #5489

adityaw24 opened this issue Jan 24, 2023 · 3 comments

Comments

@adityaw24
Copy link

adityaw24 commented Jan 24, 2023

Describe the issue

#5420 I got error after update axios

`const apiRequest = (arguments_: ApiRequestProperties) => {
const { method, bodyRequest, params, path, url, timeout, headers, auth } =
arguments_
const baseUrl = url || BASE_URL || ''
const config: AxiosRequestConfig = {
headers: {
'Content-Type': 'application/json',
},
url: {baseUrl} {path || ''},
method,
auth,
}

if (headers) {
config.headers = { ...config.headers, ...headers } as AxiosRequestHeaders
}

if (bodyRequest) {
config.data = bodyRequest
}
if (params) {
config.params = {
...params,
apikey: API_KEY,
}
}
if (auth) {
config.auth = auth
}

if (timeout) {
config.timeout = timeout
}

return axios(config)
}`

Example Code

No response

Expected behavior

No response

Axios Version

1.2.0

Adapter Version

No response

Browser

No response

Browser Version

No response

Node.js Version

No response

OS

No response

Additional Library Versions

React 18.2,
typescript 4.9

Additional context/Screenshots

No response

@adityaw24
Copy link
Author

image

@imaksp
Copy link

imaksp commented Jan 24, 2023

already fixed wait for 1.2.4 release.
See this issue for details: #5476

@glutaminefree
Copy link

Latest release on NPM still 1.2.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants