public async Task <string> InsertGroup(string token, string data) { HttpResponseMessage response = await _httpUtil.PostAsync(token, APIs.GetFormByAlias(Keywords.GROUP), data); if (response == null || response.StatusCode != HttpStatusCode.Created) { return("{}"); } string content = await response.Content.ReadAsStringAsync(); return(content); }
public async Task <string> FindFormWithNoToken(string path) { // Use to get form with Anonymous assign HttpResponseMessage response = await _httpUtil.GetAsync(APIs.GetFormByAlias(path)); if (response == null || !response.IsSuccessStatusCode) { return("{}"); } string content = await response.Content.ReadAsStringAsync(); return(content); }
public async Task <string> FindFormWithToken(string token, string path) { string apiURI = APIs.GetFormByAlias(path); HttpResponseMessage response = await _httpUtil.GetAsync(token, apiURI); if (response == null || !response.IsSuccessStatusCode) { return("{}"); } string content = await response.Content.ReadAsStringAsync(); return(content); }