diff --git a/kernel/kernel-websubclient-api/src/main/java/io/mosip/kernel/websub/api/model/MultipleReadHttpRequest.java b/kernel/kernel-websubclient-api/src/main/java/io/mosip/kernel/websub/api/model/MultipleReadHttpRequest.java index 5fa770e7d63..11ed48b2ea1 100644 --- a/kernel/kernel-websubclient-api/src/main/java/io/mosip/kernel/websub/api/model/MultipleReadHttpRequest.java +++ b/kernel/kernel-websubclient-api/src/main/java/io/mosip/kernel/websub/api/model/MultipleReadHttpRequest.java @@ -5,6 +5,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; +import java.util.Map; import jakarta.servlet.ServletInputStream; import jakarta.servlet.http.HttpServletRequest; @@ -20,9 +21,11 @@ */ public class MultipleReadHttpRequest extends HttpServletRequestWrapper { private byte[] cachedBody; + private Map parameterMap; public MultipleReadHttpRequest(HttpServletRequest request) throws IOException { super(request); - InputStream requestInputStream = request.getInputStream(); + parameterMap = request.getParameterMap(); + InputStream requestInputStream = request.getInputStream(); this.cachedBody = StreamUtils.copyToByteArray(requestInputStream); } @@ -31,11 +34,14 @@ public ServletInputStream getInputStream() throws IOException { return new MultipleReadServletInputStream(this.cachedBody); } - - @Override public BufferedReader getReader() throws IOException { ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(this.cachedBody); return new BufferedReader(new InputStreamReader(byteArrayInputStream)); } + + @Override + public Map getParameterMap() { + return this.parameterMap; + } } \ No newline at end of file