Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-12055

Shortcut method for building HEAD requests with MockMvcRequestBuilders

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: None
    • Fix Version/s: 4.1 RC2
    • Component/s: Test
    • Labels:

      Description

      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.

        Attachments

          Activity

            People

            Assignee:
            rstoya05-aop Rossen Stoyanchev
            Reporter:
            jnarloch Jakub Narloch
            Last updater:
            Spring Issues Spring Issues
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              3 years, 23 weeks, 6 days ago