This commit is contained in:
@@ -21,7 +21,7 @@ namespace AyaNova.PlugIn.V8
|
||||
public static GZTW.AyaNova.BLL.LocalizedTextTable LocaleText = null;
|
||||
const string TEST_ROUTE = "notify/hello";
|
||||
const string API_BASE_ROUTE = "api/v8/";
|
||||
public static HttpClient client = null;
|
||||
public static HttpClient client = new HttpClient();
|
||||
//url once known to be good
|
||||
internal static string ApiBaseUrl { get; set; }
|
||||
internal static string JWT { get; set; }
|
||||
@@ -40,11 +40,11 @@ namespace AyaNova.PlugIn.V8
|
||||
private static void InitClient()
|
||||
{
|
||||
if (Initialized) return;
|
||||
if (client != null)
|
||||
client.Dispose();
|
||||
client = null;
|
||||
client = new HttpClient();
|
||||
client.Timeout = new TimeSpan(0, 0, 30);
|
||||
//if (client != null)
|
||||
// client.Dispose();
|
||||
//client = null;
|
||||
//client = new HttpClient();
|
||||
client.Timeout = new TimeSpan(0, 1, 0);
|
||||
client.BaseAddress = new Uri(ApiBaseUrl);
|
||||
client.DefaultRequestHeaders.Accept.Clear();
|
||||
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
|
||||
|
||||
Reference in New Issue
Block a user