diff --git a/Runtime/BaseEndPoint.cs b/Runtime/BaseEndPoint.cs index 761992d..3620450 100644 --- a/Runtime/BaseEndPoint.cs +++ b/Runtime/BaseEndPoint.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; +using UnityEngine.Networking; using Utilities.WebRequestRest.Interfaces; namespace Utilities.WebRequestRest @@ -44,7 +45,7 @@ protected string GetUrl(string endpoint = "", Dictionary 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; diff --git a/package.json b/package.json index 89b9c3a..6a9847a 100644 --- a/package.json +++ b/package.json @@ -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",