Previously, some MockMvc-specific logic would add a Content-Length header to every request that had content. This led to the curl request snippet containing a -H option for the Content-Length header. This is unnecessary as curl will automatically generate a Content-Length header based on the data that's being sent to the server. A secondary problem was the inconsistent automatic addition of a Content-Length header; the header was not automatically added to responses. This commit remove the MockMvc-specific logic in favour of some new logic in the core project to automatically add a Content-Length header to both requests and responses. The curl request snippet has been updated to supress the header in favour of curl's automatic generation. Closes gh-111
Spring REST Docs 
Overview
The primary goal of this project is to make it easy to document RESTful services by combining content that's been hand-written using Asciidoctor with auto-generated examples produced with the Spring MVC Test framework. The result is intended to be an easy-to-read user guide, akin to GitHub's API documentation for example, rather than the fully automated, dense API documentation produced by tools like Swagger.
For a broader introduction see the Documenting RESTful APIs presentation. Both the slides and a video recording are available.
Learning more
To learn more about Spring REST Docs, please consult the reference documentation.
Building from source
Spring REST Docs requires Java 7 or later and is built using Gradle:
./gradlew build
Contributing
Pull requests are welcome. Please see the contributor guidelines for details.
Licence
Spring REST Docs is open source software released under the Apache 2.0 license.