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 $webrequest_opts.Headers = $req_headers
} }
if ($body -ne $null) {
$webrequest_opts.Body = $body
Set-Attr $result.win_uri "body" $body
}
try { try {
$response = Invoke-WebRequest @webrequest_opts $response = Invoke-WebRequest @webrequest_opts
} catch { } catch {

View file

@ -120,6 +120,11 @@ use_basic_parsing:
returned: always returned: always
type: bool type: bool
sample: True 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: status_code:
description: The HTTP Status Code of the response. description: The HTTP Status Code of the response.
returned: success returned: success