From 2ee30ddfb8c9b0c0f5281855a0430219ba8e8fa0 Mon Sep 17 00:00:00 2001 From: Octol1ttle Date: Sun, 11 Jun 2023 17:09:01 +0500 Subject: [PATCH] Add xmldocs for Extensions#EncodeHeader(string) Signed-off-by: Octol1ttle --- Extensions.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Extensions.cs b/Extensions.cs index b13a52c..3cd80bd 100644 --- a/Extensions.cs +++ b/Extensions.cs @@ -109,6 +109,12 @@ public static class Extensions { return Messages.ResourceManager.GetString(key, Messages.Culture) ?? key; } + /// + /// Encodes a string to allow its transmission in request headers. + /// + /// Used when encountering "Request headers must contain only ASCII characters". + /// The string to encode. + /// An encoded string with spaces kept intact. public static string EncodeHeader(this string s) { return WebUtility.UrlEncode(s).Replace('+', ' '); }