Sync docs from master to gh-pages
This commit is contained in:
@@ -1891,7 +1891,7 @@ Groovy Map notation.
|
||||
request {
|
||||
//...
|
||||
|
||||
// JSON and XML formats of request body are supported.
|
||||
// Currently only JSON format of request body is supported.
|
||||
// Format will be determined from a header or body's content.
|
||||
body '''{ "login" : "john", "name": "John The Contract" }'''
|
||||
}
|
||||
@@ -1902,27 +1902,6 @@ Groovy Map notation.
|
||||
}</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p><strong>Body’s format</strong> can also be specified explicitly by invoking one of format functions.</p>
|
||||
</div>
|
||||
<div class="listingblock">
|
||||
<div class="content">
|
||||
<pre class="highlight"><code class="language-groovy" data-lang="groovy">org.springframework.cloud.contract.spec.Contract.make {
|
||||
request {
|
||||
//...
|
||||
|
||||
// In this case body will be formatted as XML.
|
||||
body equalToXml(
|
||||
'''<user><login>john</login><name>John The Contract</name></user>'''
|
||||
)
|
||||
}
|
||||
|
||||
response {
|
||||
//...
|
||||
}
|
||||
}</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect3">
|
||||
<h4 id="_response">Response</h4>
|
||||
@@ -5410,7 +5389,7 @@ number of different ways, including as described above using
|
||||
</div>
|
||||
<div id="footer">
|
||||
<div id="footer-text">
|
||||
Last updated 2016-08-30 06:20:00 UTC
|
||||
Last updated 2016-08-30 09:20:18 UTC
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user