示例#1
0
 public static async Task AddAdminIcon(AdminIcon img)
 {
     var        json   = JsonConvert.SerializeObject(img);
     var        c      = new StringContent(json, Encoding.UTF8, "application/json");
     HttpClient client = new HttpClient();
     var        r      = await client.PostAsync(LINK + AIMAGE, c);
 }
示例#2
0
        public static async Task <HttpResponseMessage> EditAdminIcon(AdminIcon icon)
        {
            var        json     = JsonConvert.SerializeObject(icon);
            var        content  = new StringContent(json, Encoding.UTF8, "application/json");
            HttpClient client   = new HttpClient();
            var        responce = await client.PutAsync(LINK + AIMAGE + "/" + icon.ID, content);

            return(responce);
        }