How do I set the Connection header in older versions? #823
-
|
We may be forced to use an older version of GenHTTP (8.6.0, for compatibility with NET 7). I don't see an obvious way of setting the If I try to set it as part of a webservice response, like so: return request.Respond()
.Content(...)
.Header("Connection", "close")
.Type(...)
.Build();I get an exception:
In the latest version I can use the but that doesn't seem to exist in this older version. What/where is the property that the exception message refers to in version 8.6.0? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
In older versions, Any chance to update your project to .NET 8? dotnet updates are pretty easy nowadays and .NET 7 is not supported anymore. |
Beta Was this translation helpful? Give feedback.
In older versions,
keep-alivewas assumed by the server if the client did not instruct otherwise (by specifying theConnection: closeheader or by using HTTP/1.0). Only since version 10 this can be manually overridden. So I fear there is no option I can give you for 8.x, except forking the release branch.Any chance to update your project to .NET 8? dotnet updates are pretty easy nowadays and .NET 7 is not supported anymore.