CodingAleCR / http_interceptor

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

interceptResponse, missing response headers #100

Closed yan-064 closed 2 years ago

yan-064 commented 2 years ago

Hi,

I have some trouble, I'd like to retrieve custom header into the interceptresponse but the ResponseData object reveal only one header. Look at the screenshot. I'm searching for the Token-AuthorizationUser-Expired header and it's missing. The data contains only one header instead of 9 in the chrome network tab.

Thanks for your help.

image

yan-064 commented 2 years ago

My bad ^^.

The api has to expose the header with the Access-Control-Expose-Headers header.

https://github.com/dart-lang/http/issues/409

I close.

CodingAleCR commented 2 years ago

I'm glad you were able to solve it! Cheers and thanks for using the library 🎉

Also, we have a beta version for 2.0.0 which refactors our internal API for a much more extensible one, feel free to try it out ;)