1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fixes win_uri module ignoring body argument (#2504)

* Fixes win_uri module ignoring body argument

* Added body field of the response to the documentation
This commit is contained in:
Iago Garrido 2016-11-07 22:04:09 +01:00 committed by Matt Clay
parent bedf56a7fd
commit 6036bb69d9
2 changed files with 10 additions and 0 deletions

View file

@ -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 {

View file

@ -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