Fixes win_uri module ignoring body argument (#2504)

* Fixes win_uri module ignoring body argument

* Added body field of the response to the documentation
pull/18777/head
Iago Garrido 8 years ago committed by Matt Clay
parent bedf56a7fd
commit 6036bb69d9

@ -65,6 +65,11 @@ if ($headers -ne $null) {
$webrequest_opts.Headers = $req_headers
}
if ($body -ne $null) {
$webrequest_opts.Body = $body
Set-Attr $result.win_uri "body" $body
}
try {
$response = Invoke-WebRequest @webrequest_opts
} catch {

@ -120,6 +120,11 @@ use_basic_parsing:
returned: always
type: bool
sample: True
body:
description: The content of the body used (added in version 2.2)
returned: when body is specified
type: string
sample: '{"id":1}'
status_code:
description: The HTTP Status Code of the response.
returned: success

Loading…
Cancel
Save