From 8681ecf1cfd96e8b1d8907feb4cd2051035794f4 Mon Sep 17 00:00:00 2001 From: Yuri Smirnov Date: Thu, 2 May 2024 14:12:10 +0300 Subject: [PATCH] rewind req body (#28) --- Gemfile.lock | 2 +- lib/umbrellio_utils/request_wrapper.rb | 1 + lib/umbrellio_utils/version.rb | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index d0349b7..fe2c8ec 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - umbrellio-utils (1.0.0) + umbrellio-utils (1.1.0) memery (~> 1) GEM diff --git a/lib/umbrellio_utils/request_wrapper.rb b/lib/umbrellio_utils/request_wrapper.rb index 6ce95e0..6a59d9a 100644 --- a/lib/umbrellio_utils/request_wrapper.rb +++ b/lib/umbrellio_utils/request_wrapper.rb @@ -14,6 +14,7 @@ def initialize(request, remove_xml_attributes: true) end memoize def body + request.body.rewind request.body.read.dup.force_encoding("utf-8") end diff --git a/lib/umbrellio_utils/version.rb b/lib/umbrellio_utils/version.rb index 25c84bd..4a80661 100644 --- a/lib/umbrellio_utils/version.rb +++ b/lib/umbrellio_utils/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module UmbrellioUtils - VERSION = "1.0.0" + VERSION = "1.1.0" end