diff --git a/http2.d b/http2.d index acc7368..0e8c0f2 100644 --- a/http2.d +++ b/http2.d @@ -1049,6 +1049,16 @@ class HttpRequest { this(null, where, method, cache, timeout, proxy); } + /++ + Adds the given header to the request, without checking for duplicates or similar. + + History: + Added October 8, 2025. Previously, you'd have to do `request.requestParameters.headers ~= "Name: Value"` (which is exactly what this does, but less conveniently). + +/ + void addHeader(string name, string value) { + this.requestParameters.headers ~= name ~ ": " ~ value; + } + /++ Sets the timeout from inactivity on the request. This is the amount of time that passes with no send or receive activity on the request before it fails with "request timed out" error.