mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
scaleway: Fix case mismatch causing key lookup failure (#445)
The common http api client class used by the scaleway modules only enables automatic jsonification of the request body if the "Content-Type" header is application/json. The client only included "Content-type" in its default set of headers (notice the case variation). This caused a KeyError on send() if the caller relied on the default content-type value.
This commit is contained in:
parent
c2bf9ea9fb
commit
1a0a185ac3
2 changed files with 3 additions and 1 deletions
|
@ -0,0 +1,2 @@
|
||||||
|
bugfixes:
|
||||||
|
- scaleway - Fix bug causing KeyError exception on JSON http requests. (https://github.com/ansible-collections/community.general/pull/444)
|
|
@ -90,7 +90,7 @@ class Scaleway(object):
|
||||||
self.headers = {
|
self.headers = {
|
||||||
'X-Auth-Token': self.module.params.get('api_token'),
|
'X-Auth-Token': self.module.params.get('api_token'),
|
||||||
'User-Agent': self.get_user_agent_string(module),
|
'User-Agent': self.get_user_agent_string(module),
|
||||||
'Content-type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
}
|
}
|
||||||
self.name = None
|
self.name = None
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue