BetterHttpClient icon indicating copy to clipboard operation
BetterHttpClient copied to clipboard

No support for Host header

Open Eric898989 opened this issue 8 years ago • 1 comments

No implementation exists to be able to define the host header (situation where ip is known and multiple virtual servers exist) :-) GET \index.php HTTP1.1\r\nHost: XXXX\r\n XXXX is always requestUri.Host so impossible to let connect TCPclient on the ip (https:\45.45.45.45\index.php) then request a page with the virtualserver name.

Eric898989 avatar Dec 04 '16 09:12 Eric898989

do you mean set CustomHeaders ?

NameValueCollection headers = new NameValueCollection();
headers.Add("xxx", "xxx");
HttpClient client = new HttpClient(proxy)
{
    CustomHeaders =  headers,
};

ikebo avatar Jan 21 '19 02:01 ikebo