mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 03:11:24 -07:00
uri/win_uri: Make method a free text field (#49719)
* uri/win_uri: Make method a free text field Since various interfaces introduce their own HTTP method (e.g. like PROPFIND, LIST or TRACE) it's better to leave this up to the user. * Fix HTTP method check in module_utils urls * Add integration test for method UNKNOWN * Clarify the change as requested during review
This commit is contained in:
parent
81ec48c7b4
commit
4e6c113bf0
7 changed files with 50 additions and 11 deletions
|
@ -1128,8 +1128,6 @@ class Request:
|
|||
urllib_request.install_opener(opener)
|
||||
|
||||
data = to_bytes(data, nonstring='passthru')
|
||||
if method not in ('OPTIONS', 'GET', 'HEAD', 'POST', 'PUT', 'DELETE', 'TRACE', 'CONNECT', 'PATCH'):
|
||||
raise ConnectionError('invalid HTTP request method; %s' % method)
|
||||
request = RequestWithMethod(url, method, data)
|
||||
|
||||
# add the custom agent header, to help prevent issues
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue