Open randallfox opened 6 years ago
This seems like a bug to me. I'm sorry I haven't been back here to see your report in so long.
I cannot understand why the headers on RequestInfo
are other than the headers from the original req
, supplemented with the 'Content-Type': 'application/json' header. I believe that was the original intention.
As you discovered, the original headers ARE preserved in RequestInfo.req.headers
. You can use those.
I hope to fix it soon.
And I will make sure the fix preserves the original headers in RequestInfo.req.headers
just as it does today. So you won't be broken.
Can't access request headers in override. The typed RequestInfo doesn't have them. I did find them when I cast the requestinfo variable/parameter as an 'any'.. So there is a work around. Would rather use the variable as it's typed implementation though.. Here is the code:
I guess my biggest concern is if this work around is safe to use or will it be wiped in a future release? I looked at the demo code in github for the sample override, and I think I'm doing it right. If I'm not, please let me know what IMPORT command I need.. thx