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

Sending DELETE request without id causing double slashes url path #2

Open
gaghan430 opened this issue Apr 28, 2021 · 1 comment
Open
Assignees
Labels
enhancement New feature or request

Comments

@gaghan430
Copy link

gaghan430 commented Apr 28, 2021

so when we use something like collection.delete(null, { suffix: 'delete' }),
we expect to get /endpoint/delete, but what we get is /endpoint//delete

I guess we need to filter out falsy values from this segments https://github.com/mahdaen/metal-data/blob/master/src/request.ts#L84

@mahdaen
Copy link
Owner

mahdaen commented Apr 28, 2021

@gaghan430 Good point to prevent falsy values, will work on that! But for such operation I suggest to use the .request() method instead, to keep the coding style clean.

@mahdaen mahdaen added the enhancement New feature or request label Apr 28, 2021
@mahdaen mahdaen self-assigned this Apr 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants