Skip to content

Commit

Permalink
fix(request): unspecified location goes in body, also for blob
Browse files Browse the repository at this point in the history
previously a "blob" type without location given would be added as a nested data element which was incorrect.
  • Loading branch information
Tieske committed Jun 17, 2024
1 parent 2d90a8c commit 1ffb854
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@ Release process:
1. test installing the rock from LuaRocks


### 1.x.x unreleased

- fix: when a "blob" type has no location specified, then use it as the body, same as with other types.
[120](https://github.com/Kong/lua-resty-aws/pull/120)

### 1.5.0 (20-May-2024)

- feat: decode AWS api response json body with array metatable
Expand Down
2 changes: 0 additions & 2 deletions src/resty/aws/request/build.lua
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,6 @@ local function build_request(operation, config, params)
if config.protocol == "query" then
-- no location specified, but protocol is query, so it goes into query
request.query[name] = param_value
elseif member_config.type == "blob" then
request.body = param_value
else
-- nowhere else to go, so put it in the body (for json and xml)
body_tbl[name] = param_value
Expand Down

0 comments on commit 1ffb854

Please sign in to comment.