in Assets/Scripts/HttpModule.cs [15:45]
public static async Task<string> GetAsync(string path, string jwt, CallbackDelegate callback)
{
string resp = "";
var httpRequestMessage = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri(path),
Headers =
{
{
HttpRequestHeader.Authorization.ToString(), jwt
},
{
"ClientInfo", JsonUtility.ToJson(GameSystem.GetClientInfo())
}
}
};
HttpResponseMessage response = await client.SendAsync(httpRequestMessage);
if (response.IsSuccessStatusCode)
{
resp = response.Content.ReadAsStringAsync().Result;
callback(resp);
}
else
{
Debug.Log("[HttpModule] Send Error - " + response.Content);
}
return resp;
}