CodingAleCR / http_interceptor

A lightweight, simple plugin that allows you to intercept request and response objects and modify them if desired.
MIT License
134 stars 67 forks source link

Adding bodyBytes to RequestData #52

Closed jcblancomartinez closed 3 years ago

jcblancomartinez commented 3 years ago

Is your feature request related to a problem? Please describe.

Currently, InterceptorContract's interceptRequest and interceptResponse methods receive RequestData.

RequestData has body field but not bodyBytes.

We want access to bodyBytes to be able to decode it using the right encoding. In our case, we use UTF8, instead of latin1.

Describe the solution you'd like

I suggest bodyBytes gets added to RequestData.

Describe alternatives you've considered

I could encode in latin1 and decode it using UTF8.

Additional context

CodingAleCR commented 3 years ago

Hi, thanks, will look into adding this to the backlog and prioritizing as it is requested by users of the plugin.

CodingAleCR commented 3 years ago

This will be coming out soon, keep an eye out :)

jcblancomartinez commented 3 years ago

@CodingAleCR This is not yet available in http_interceptor 0.4.1. Can you please let me know when you release a version with these changes?

Thanks.

CodingAleCR commented 3 years ago

Will do. Stable 1.0.0 is coming out soon with this already in it ☺️🙌🏼