[Elixir] Use string headers (#19759)

* Use string headers in Elixir request builder

* Add samples

* Update add_param spec

* Updated samples with spec changes

* Convert header values and keys to strings in add_param/4
This commit is contained in:
Nate Todd 2024-12-07 01:58:36 -05:00 committed by GitHub
parent f62aa5bd95
commit 35df38de38
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -104,7 +104,7 @@ defmodule {{moduleName}}.RequestBuilder do
headers =
request
|> Map.get(:headers, [])
|> List.keystore(key, 0, {key, value})
|> List.keystore(to_string(key), 0, {to_string(key), to_string(value)})
Map.put(request, :headers, headers)
end

View File

@ -106,7 +106,7 @@ defmodule OpenapiPetstore.RequestBuilder do
headers =
request
|> Map.get(:headers, [])
|> List.keystore(key, 0, {key, value})
|> List.keystore(to_string(key), 0, {to_string(key), to_string(value)})
Map.put(request, :headers, headers)
end