Skip to content

Commit

Permalink
Merge pull request #201 from thoroai/feat/add-custom-metadata-support
Browse files Browse the repository at this point in the history
Add support for custom metadata.
  • Loading branch information
onno-vos-dev authored Nov 20, 2024
2 parents eeb52b5 + d4681e7 commit 1cb06f0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/aws/request.ex
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,15 @@ defmodule AWS.Request do
nil ->
{headers, params}

param_value when is_map(param_value) ->
headers =
Enum.reduce(param_value, headers, fn {k, v} ->
{header_name <> k, v}
end)

params = Map.delete(params, param_name)
{headers, params}

param_value ->
headers = [{header_name, param_value} | headers]
params = Map.delete(params, param_name)
Expand Down

0 comments on commit 1cb06f0

Please sign in to comment.