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:
parent
bedf56a7fd
commit
6036bb69d9
2 changed files with 10 additions and 0 deletions
|
@ -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…
Reference in a new issue