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

Shortcut method for building HEAD requests with MockMvcRequestBuilders [SPR-12055] #16671

Closed
spring-projects-issues opened this issue Aug 1, 2014 · 1 comment
Assignees
Labels
in: test type: enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Aug 1, 2014

Jakub Narloch opened SPR-12055 and commented

We are using quite extensively the HEAD method in our API for verifying whether the resource does exists (similary to DATA REST: http://docs.spring.io/spring-data/rest/docs/2.1.2.RELEASE/reference/html/repository-resources.html#d5e159) and we noticed that the MockMvcRequestBuilders does not have an utility method for creating HEAD request similar tor GET, POST etc. Instead such request could be created using the #request method.

I think that adding additional #head method could be usefull and definetly would make the API concise and consistent.

I'm willing to prepare and submit a patch for this issue.


Referenced from: pull request #613, and commits a11b625

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Aug 1, 2014

Jakub Narloch commented

I've made the pull request: #613

I've noticed that there is no test case for MockMvcRequestBuilders so I didn't include any unit test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: test type: enhancement
Projects
None yet
Development

No branches or pull requests

2 participants