Skip to content

Commit

Permalink
Fix for all aws_bedrock APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
onnovos committed Jan 27, 2025
1 parent 20494a1 commit e4e2ce9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion priv/rest.erl.eex
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ do_request(Client, Method, Path, Query, Headers0, Input, Options, SuccessStatusC
Headers1 = aws_request:add_headers(AdditionalHeaders, Headers0),

MethodBin = aws_request:method_to_binary(Method),
SignedHeaders = aws_request:sign_request(Client1, MethodBin, URL, Headers1, Payload<%= if context.module_name in ["aws_apigatewaymanagementapi", "aws_bedrock_runtime"] do %>, [{uri_encode_path, true}]<% else %><% end %>),
SignedHeaders = aws_request:sign_request(Client1, MethodBin, URL, Headers1, Payload<%= if context.module_name == "aws_apigatewaymanagementapi" or String.contains?(context.module_name, "aws_bedrock") do %>, [{uri_encode_path, true}]<% else %><% end %>),
Response = hackney:request(Method, URL, SignedHeaders, Payload, Options),
DecodeBody = not proplists:get_value(receive_body_as_binary, Options),
handle_response(Response, SuccessStatusCode, DecodeBody).
Expand Down

0 comments on commit e4e2ce9

Please sign in to comment.