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

While calling the API axios adds an extra '/' in request at the end (not base url) #6755

Open
buhshanpjoshi opened this issue Jan 10, 2025 · 0 comments

Comments

@buhshanpjoshi
Copy link

Describe the bug

Hey,
If url contains the text 'post' in the url its observed axios is adding extra '/' at the end while calling the api which results into 404 Not found.

e.g. formed url while calling - https://hostname/users/bhushan.joshi@gmail/EMP/temp-auth-method
final url - https://hostname/users/bhushan.joshi@gmail/EMP/temp-auth-method

But when its had 'post' in the url
e.g. formed url while calling - https://hostname/users/bhushan.postel@gmail/EMP/temp-auth-method OR https://hostname/users/bhushan.abcpostxx@gmail/EMP/temp-auth-method
final url - https://hostname/users/bhushan.postel@gmail/EMP/temp-auth-method**/** (adds extra slash in it)

To Reproduce

No response

Code snippet

const response = await endpoint().put(`users/${userId}/${userType}/temp-auth-method`,
    payload,
    { headers: { 'Csrf-Token': 'nocheck' } }
  );

Expected behavior

No response

Axios Version

^0.21.1

Adapter Version

No response

Browser

chrome,IE

Browser Version

No response

Node.js Version

No response

OS

No response

Additional Library Versions

No response

Additional context/Screenshots

No response

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

1 participant