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

plz.el support GET with body #47

Open
vlnn opened this issue Mar 3, 2024 · 3 comments
Open

plz.el support GET with body #47

vlnn opened this issue Mar 3, 2024 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@vlnn
Copy link

vlnn commented Mar 3, 2024

It's not recommended practice, but GET requests could be used with non-empty body, and I happened to work with 3rd-party API that officially requests this. CURL works well with their example, but plz does not. My naive approach shown here vlnn@ad4725e but I have no clue how bad with approach is — for now it's my workaround. But for future, shouldn't GET support that?

@alphapapa
Copy link
Owner

Hmm, well, I guess if curl allows it, we can do it. What do the RFCs say about this?

@vlnn
Copy link
Author

vlnn commented Mar 3, 2024

`A payload within a GET request message has no defined semantics;
sending a payload body on a GET request might cause some existing
implementations to reject the request.

The response to a GET request is cacheable; a cache MAY use it to
satisfy subsequent GET and HEAD requests unless otherwise indicated
by the Cache-Control header field (Section 5.2 of [RFC7234]).`

which does not restrict, but beware of usage the payload with GET.

Still, the MIGHT is very vague in RFC, same as OPTIONAL, so I guess this is very non-restrictive way to say "we don't like it, it may not work, but it's possible".

@alphapapa
Copy link
Owner

Ok, well, if it's allowed, and if someone needs to do it, and curl can do it, I'm willing to merge a patch that does it. :)

@alphapapa alphapapa added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants