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

DELETE request body #31

Open
tiggerbiggo opened this issue Mar 6, 2024 · 1 comment
Open

DELETE request body #31

tiggerbiggo opened this issue Mar 6, 2024 · 1 comment

Comments

@tiggerbiggo
Copy link

Hi,

I understand that the spec regarding a body in a DELETE request is not recommended, but some APIs ignore this common best practice and demand a body in a delete request.

Since it is not forbidden by the spec, and it seems increasingly to be the trend that endpoints are ignoring the history of this request type, I end up needing to switch to cURL more and more frequently to make these requests in the real world. I would much rather use FRequest for all my testing since it provides a nice interface and saves all my settings in the way that works for me.

I would like to request that body in DELETE be made available, even if a warning is deemed necessary to discourage people from using it. This would allow me to use these endpoints with FRequest, instead of needing other software just for DELETE with body specifically.

At a quick glance it looks to me like the change would be to move line 106 of utilfrequest.cpp to the true case, but I don’t really do cpp myself so I can’t build it easily to test for bugs with that potentially naive approach to a code base i’m not familiar with.

If you decide this isn’t suitable for the public release version but can confirm this change would work, i’ll probably learn how to build it myself so I can make a copy that works for my use case specifically. The magic of open source :)

Thanks, this app is really neat.

@fabiobento512
Copy link
Owner

fabiobento512 commented Mar 10, 2024

Hello,

Thanks for your suggestion. This is something that I should have a look. Possibly we could add a project specific setting to allow those kind of not recommend requests / practices.

Unfortunately lately I have not been able to spend much time in this project due to personal reasons and also because that at work I have not been working much with REST apis anymore, I have tried there JSON RPC (with websockets) which I kinda became a fan of.

At a quick glance it looks to me like the change would be to move line 106 of utilfrequest.cpp to the true case, but I don’t really do cpp myself so I can’t build it easily to test for bugs with that potentially naive approach to a code base i’m not familiar with.

From a quick look it seems you are correct, changing that to true should allow you to have a body in DELETE. Even if you don't have experience with C++ you should be able to change it without a problem (for personal use), I would suggest that you clone the project, as it already contains a github action file that will build the application for you. So I think you can clone it, change that line on a new commit, and github should provide you a new build with what you need.

Thanks, this app is really neat.

Thank you, it is always nice to hear that the application is useful to others.

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

2 participants