GooglePlayInstant/Editor/QuickDeploy/HttpRequestHelper.cs
/// <summary>
/// Adds GET params to endpoint and returns result.
/// </summary>
/// <remarks>Assumes endpoint does not have any queries attached to it.</remarks>
Adds GET params to endpoint and returns result.
Adds GET params to endpoint and returns result .
internal static string GetEndpointWithGetParams(string endpoint, Dictionary<string, string> getParams)
        {
            var uriBuilder = new UriBuilder(endpoint);
            if (getParams != null)
            {
                uriBuilder.Query = string.Join("&",
                    getParams.Select(kvp =>
                            string.Format("{0}={1}", Uri.EscapeDataString(kvp.Key), Uri.EscapeDataString(kvp.Value)))
                        .ToArray());
            }
            return uriBuilder.ToString();
        }
internal static string GetEndpointWithGetParams ( string endpoint , Dictionary < string , string > getParams ) { var uriBuilder = new UriBuilder ( endpoint ) ; if ( getParams != null ) { uriBuilder . Query = string . Join ( " " , getParams . Select ( kvp => string . Format ( " " , Uri . EscapeDataString ( kvp . Key ) , Uri . EscapeDataString ( kvp . Value ) ) ) . ToArray ( ) ) ; } return uriBuilder . ToString ( ) ; }
Adds GET params to endpoint and returns result.
Adds GET params to endpoint and returns result .
endpoint
string
getParams
Dictionary<string, string>
remarks
Assumes endpoint does not have any queries attached to it.
Assumes endpoint does not have any queries attached to it .