mirror of
https://github.com/TeamOctolings/Octobot.git
synced 2025-04-20 00:43:36 +03:00
Add xmldocs for Extensions#EncodeHeader(string)
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This commit is contained in:
parent
f4738e5dd4
commit
2ee30ddfb8
1 changed files with 6 additions and 0 deletions
|
@ -109,6 +109,12 @@ public static class Extensions {
|
||||||
return Messages.ResourceManager.GetString(key, Messages.Culture) ?? key;
|
return Messages.ResourceManager.GetString(key, Messages.Culture) ?? key;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Encodes a string to allow its transmission in request headers.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>Used when encountering "Request headers must contain only ASCII characters".</remarks>
|
||||||
|
/// <param name="s">The string to encode.</param>
|
||||||
|
/// <returns>An encoded string with spaces kept intact.</returns>
|
||||||
public static string EncodeHeader(this string s) {
|
public static string EncodeHeader(this string s) {
|
||||||
return WebUtility.UrlEncode(s).Replace('+', ' ');
|
return WebUtility.UrlEncode(s).Replace('+', ' ');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue