bug fixes
This commit is contained in:
parent
7c12ed8af0
commit
4bc04cd997
1 changed files with 4 additions and 3 deletions
|
@ -31,16 +31,17 @@ $webrequest_opts = @{}
|
||||||
$url = Get-AnsibleParam -obj $params -name "url" -failifempty $true
|
$url = Get-AnsibleParam -obj $params -name "url" -failifempty $true
|
||||||
$method = Get-AnsibleParam -obj $params "method" -default "GET"
|
$method = Get-AnsibleParam -obj $params "method" -default "GET"
|
||||||
$content_type = Get-AnsibleParam -obj $params -name "content_type"
|
$content_type = Get-AnsibleParam -obj $params -name "content_type"
|
||||||
|
$headers = Get-AnsibleParam -obj $params -name "headers"
|
||||||
$body = Get-AnsibleParam -obj $params -name "body"
|
$body = Get-AnsibleParam -obj $params -name "body"
|
||||||
|
|
||||||
$webrequest_opts.Uri = $url
|
$webrequest_opts.Uri = $url
|
||||||
Set-Attr $result.win_uri "url" $url
|
Set-Attr $result.win_uri "url" $url
|
||||||
|
|
||||||
@webrequest_opts.Method = $method
|
$webrequest_opts.Method = $method
|
||||||
Set-Attr $result.win_uri "method" $method
|
Set-Attr $result.win_uri "method" $method
|
||||||
|
|
||||||
@webrequest_opts.content_type = $content_type
|
$webrequest_opts.ContentType = $content_type
|
||||||
Set-Attr $result.content_type "content_type" $content_type
|
Set-Attr $result.win_uri "content_type" $content_type
|
||||||
|
|
||||||
if ($headers -ne $null) {
|
if ($headers -ne $null) {
|
||||||
$req_headers = @{}
|
$req_headers = @{}
|
||||||
|
|
Loading…
Reference in a new issue