3.56Setting the Automatic Host Header

Created on Aug 17, 2026~3 min read

The Host header is a required header in the HTTP/1.1 protocol. The Host header specifies the hostname and port number of the target server for the request, ensuring that the server can correctly distinguish different domains on the same IP address and handle them accordingly. The framework provides a convenient method for setting it:

cs
HttpRequestBuilder.Get("https://furion.net")    .AutoSetHostHeader();   // EnableHttpRequestBuilder.Get("https://furion.net")    .AutoSetHostHeader(false);   // Disable the automatic Host header

Once enabled, the Host: furion.net header is automatically added when sending an HTTP remote request.