From 19b5a864b3550e31825a1c2b181f680920f84d9b Mon Sep 17 00:00:00 2001 From: Thijs Schreijer Date: Fri, 14 Jun 2024 12:33:31 +0200 Subject: [PATCH] fix(request): unspecified location goes in body, also for blob previously a "blob" type without location given would be added as a nested data element which was incorrect. --- README.md | 5 +++++ src/resty/aws/request/build.lua | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ab06a1d..d0598e8 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/src/resty/aws/request/build.lua b/src/resty/aws/request/build.lua index d2bcef2..22b78f6 100644 --- a/src/resty/aws/request/build.lua +++ b/src/resty/aws/request/build.lua @@ -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