Skip to content

Commit

Permalink
com.utilities.rest 2.4.6 (#62)
Browse files Browse the repository at this point in the history
- fix request parameters url escape
  • Loading branch information
StephenHodgson committed Jan 2, 2024
1 parent e66f9c6 commit c9f40be
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

using System.Collections.Generic;
using System.Linq;
using UnityEngine.Networking;
using Utilities.WebRequestRest.Interfaces;

namespace Utilities.WebRequestRest
Expand Down Expand Up @@ -44,7 +45,7 @@ protected string GetUrl(string endpoint = "", Dictionary<string, string> queryPa

if (queryParameters is { Count: not 0 })
{
result += $"?{string.Join("&", queryParameters.Select(parameter => $"{parameter.Key}={parameter.Value}"))}";
result += $"?{string.Join("&", queryParameters.Select(parameter => $"{UnityWebRequest.EscapeURL(parameter.Key)}={UnityWebRequest.EscapeURL(parameter.Value)}"))}";
}

return result;
Expand Down
2 changes: 1 addition & 1 deletion Utilities.Rest/Packages/com.utilities.rest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "Utilities.Rest",
"description": "This package contains useful RESTful utilities for the Unity Game Engine.",
"keywords": [],
"version": "2.4.5",
"version": "2.4.6",
"unity": "2021.3",
"documentationUrl": "https://github.com/RageAgainstThePixel/com.utilities.rest#documentation",
"changelogUrl": "https://github.com/RageAgainstThePixel/com.utilities.rest/releases",
Expand Down

0 comments on commit c9f40be

Please sign in to comment.