Skip to content

Commit e4e2ce9

Browse files
committed
Fix for all aws_bedrock APIs
1 parent 20494a1 commit e4e2ce9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

priv/rest.erl.eex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ do_request(Client, Method, Path, Query, Headers0, Input, Options, SuccessStatusC
231231
Headers1 = aws_request:add_headers(AdditionalHeaders, Headers0),
232232

233233
MethodBin = aws_request:method_to_binary(Method),
234-
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 %>),
234+
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 %>),
235235
Response = hackney:request(Method, URL, SignedHeaders, Payload, Options),
236236
DecodeBody = not proplists:get_value(receive_body_as_binary, Options),
237237
handle_response(Response, SuccessStatusCode, DecodeBody).

0 commit comments

Comments
 (0)