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

Handle HEAD requests #135

Open
sgohlke opened this issue Feb 27, 2023 · 0 comments
Open

Handle HEAD requests #135

sgohlke opened this issue Feb 27, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@sgohlke
Copy link
Collaborator

sgohlke commented Feb 27, 2023

At the moment GraphQLServer cannot handle requests with HEAD method. In order to do so

  • Adjust the allowed methods in GraphQLServer.getRequestInformation
  • Add optional "method" field to GraphQLRequestInfo
  • Check if the RequestInformationExtractor can read information from the request, add method to returned GraphQLRequestInfo
  • Add optional "method" field to ResponseParameters
  • Add method param to calls of sendResponse
  • In sendResponse check if method is HEAD. If so, get the length of the body and add it to the content-length header, then call response.end without any body.
@sgohlke sgohlke added the enhancement New feature or request label Feb 27, 2023
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

1 participant