mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-28 11:10:21 -07:00
bug fixes
This commit is contained in:
parent
88e4faa1ac
commit
20284fed88
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…
Add table
Add a link
Reference in a new issue