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

A lot of example GET requests are sending a body #13

Open
gigantino opened this issue Jan 8, 2024 · 3 comments
Open

A lot of example GET requests are sending a body #13

gigantino opened this issue Jan 8, 2024 · 3 comments

Comments

@gigantino
Copy link
Contributor

Hello, I was giving a look at this part of the documentation:

https://www.defer.run/docs/references/http-api/v2/execution/list-executions

I tried to make a request and it didn't work because, even though it's a GET request, I'm also supposed to send a body.
I then sent it as a POST, which ended up working.

I would make the change to the docs myself, but I don't understand if having GET requests as POST was what you guys wanted originally.

@gearnode
Copy link
Member

We deliberately use a GET request with a body, which works on most HTTP clients. However, it doesn't work with fetch, so we also expose the same endpoint with the POST verb. We will improve the documentation with more information about this issue.

@gigantino
Copy link
Contributor Author

We deliberately use a GET request with a body, which works on most HTTP clients. However, it doesn't work with fetch, so we also expose the same endpoint with the POST verb. We will improve the documentation with more information about this issue.

Thank you, I'm willing to make the change if you want :)

@gearnode
Copy link
Member

Oh yes, feel free to open a pull request with the change 🚀

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