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('+', ' '); }