FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Avoid percent-encoding for "(" and ")" characters. by Powerbyte7 · Pull Request #37 · vrchatapi/vrchatapi-csharp · GitHub

Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .cs  (1) .sh  (1) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
3 changes: 3 additions & 0 deletions generate.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ sed -i 's/IsRequired = true/IsRequired = false/g' src/VRChat.API/Model/CurrentUs
# Add RequiresTwoFactorAuth property to CurrentUser
sed -i '/public string UserIcon { get; set; }/a\\n /// <summary>\n /// An array of two-factor authentication methods available to use to with two factor authentication.\n /// </summary>\n [DataMember(Name = "requiresTwoFactorAuth", IsRequired = false, EmitDefaultValue = true)]\n public List<string> RequiresTwoFactorAuth { get; set; }' src/VRChat.API/Model/CurrentUser.cs

# Avoid percent-encoding for "(" and ")" characters in URI
sed -i 's/Uri.EscapeDataString(\([\.a-zA-Z _]*\))\([^\.]\)/Uri.EscapeDataString(\1).Replace("%28", "(").Replace("%29", ")")\2/g' src/VRChat.API/Client/WebRequestPathBuilder.cs

# Remove messily pasted markdown at top of every file
for i in src/VRChat.API/*/*.cs; do
sed -i '/VRChat API Banner/d' $i
Expand Down
4 changes: 2 additions & 2 deletions src/VRChat.API/Client/WebRequestPathBuilder.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public void AddPathParameters(Dictionary<string, string> parameters)
{
foreach (var parameter in parameters)
{
_path = _path.Replace("{" + parameter.Key + "}", Uri.EscapeDataString(parameter.Value));
_path = _path.Replace("{" + parameter.Key + "}", Uri.EscapeDataString(parameter.Value).Replace("%28", "(").Replace("%29", ")"));
}
}

Expand All @@ -40,7 +40,7 @@ public void AddQueryParameters(Multimap<string, string> parameters)
{
foreach (var value in parameter.Value)
{
_query = _query + parameter.Key + "=" + Uri.EscapeDataString(value) + "&";
_query = _query + parameter.Key + "=" + Uri.EscapeDataString(value).Replace("%28", "(").Replace("%29", ")") + "&";
}
}
}
Expand Down

Back | FazBrowse Home | New Git URL