mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 05:12:45 +00: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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user