Closed twitchax closed 5 years ago
@digitalpowers, @wasabii, @urffin, take a look?
Neat. I believe the host header should probably have the port in it.
And I think you need to do special formatting for ipv6.
Seems not bad, do you think about Func<>
instead Action
in callback, so instead
.WithAfterReceive((c, hrm) =>
{
// Alter the content in some way before sending back to client.
var newContent = new StringContent("It's all greek...er, Latin...to me!");
hrm.Content = newContent;
})
use
.WithAfterReceive((c, hrm) =>
{
// Alter the content in some way before sending back to client.
return new StringContent("It's all greek...er, Latin...to me!");
})
@urffin, no, since the current Action
lets the user override any part of the HttpResponseMessage
. I have gone back and forth between an Action
that allows you to edit the response, versus a Func
that requires you to return a new one.
I stuck with the Action
because I think the 80% case is to make small adjustments to the response in the form of headers, etc.
@wasabii, it looks like the Host
header can have an optional port. I will add that.
I will also fix the IPv6 case.
@digitalpowers, @wasabii, @urffin, any other comments?
@twitchax, i can look deeper only in saturday
@urffin, addressed your comments.
@twitchax, don't forget merge to master :-)
Allow the developer to set proxy options.
Also, adds
X-Forwarded-*
andForwarded
headers.