-
Notifications
You must be signed in to change notification settings - Fork 23.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
get_url should accept headers as a dict, instead of only a complicated string #35470
Conversation
77072b6
to
1fde81c
Compare
except Exception: | ||
module.fail_json(msg="The header parameter requires a key:value,key:value syntax to be properly parsed.") | ||
module.fail_json(msg="The string representation for the `headers` parameter requires a key:value,key:value syntax to be properly parsed.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you include an integration test for the parsing failure? I know it's not a new code path, but it should be tested.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New integration test added for this parsing error.
…at was added in to description
…d string (ansible#35470) * get_url should accept headers as a dict, instead of only a complicated string * update headers description text * Add headers string and dict tests for get_url * Add intg test for string header format parsing error * Adjust deprecation version ahead 1 release, add the version dict format was added in to description
SUMMARY
get_url should accept headers as a dict, instead of only a complicated string
This also allows for headers that may use
,
s to separate values like:As of now, the above is impossible.
ISSUE TYPE
COMPONENT NAME
lib/ansible/modules/net_tools/basics/get_url.py
ANSIBLE VERSION
ADDITIONAL INFORMATION