CodingAleCR / http_interceptor

A lightweight, simple plugin that allows you to intercept request and response objects and modify them if desired.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BaseRequest field is missing in ResponseData

II11II opened this issue · comments

In mapper method Response toHttpResponse() and factory factory ResponseData.fromHttpResponse(Response response) , mapping BaseRequest is missing.
P.s. in Response toHttpResponse() method maps to Request only method and Uri. But headers and bodies are missing

Thank you for opening the issue, I will get to it ASAP🔥

@CodingAleCR Thank you)
I would like to ask why custom models f.e. RequestData and ResponseData are created?
May they be replaced by default http library models, Request and Respone respectively?

They are needed in order to provide mutable versions of Request and Response classes on http. For example, query parameters are not mutable in Request, and thus you are not able to intercept those.

@all-contributors add @II11II for tests and code