Skip to content

Allow body payload for GET requests #400

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

Open
UniqueTokens opened this issue Aug 16, 2021 · 0 comments
Open

Allow body payload for GET requests #400

UniqueTokens opened this issue Aug 16, 2021 · 0 comments

Comments

@UniqueTokens
Copy link
Contributor

Currently Genie allows body payload for POST, PUT, or PATCH requests only.

julia> using Genie

help?> Genie.Router.ispayload
  ispayload(req::HTTP.Request)

  True if the request can carry a payload - that is, it's a POST, PUT, or PATCH request

According RfC 7231 other requests (especially GET) can carry a body payload too. This is particularly useful if the payload contains sensitive data or, because of its (variable) length, cannot be Base64-encoded as a parameter in the URL, or because it should not be cached or logged for other reasons.

POST, PUT, or PATCH are unsuitable if no data is to be created or changed on the server, eg. for pure search queries. A suitable verb is drafted in HTTP SEARCH Method. In the meantime, Genie should follow the relevant decisions as they made Swagger and OpenAPI and allow body payload for GET.

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