private static T1 CallBackendSync <T1>(bool post, string endpoint, object input) { string inp = JsonConvert.SerializeObject(input); endpoint = Config.BackendBaseUrl + endpoint; T1 res = RESTCalls.RestCallSync <T1>(inp, endpoint, post); return(res); }
/// <summary> /// Calls the backend async. /// </summary> /// <returns>The response</returns> /// <param name="post">True = use POST; False = use GET</param> /// <param name="endpoint">The endpoint</param> /// <param name="input">The request</param> /// <typeparam name="T1">The type of the response</typeparam> private async static Task <T1> CallBackendAsync <T1>(bool post, string endpoint, object input) { string inp = JsonConvert.SerializeObject(input); endpoint = Config.BackendBaseUrl + endpoint; Task <T1> res = RESTCalls.RestCallAsync <T1>(inp, endpoint, post); return(await res); }