public static void CreateArticle(string author, string title, string content, byte[] image, string sessionKey) { string loginUrl = "Articles/create/" + sessionKey; ArticleModel article = new ArticleModel { Author = author, Title = title, Content = content, ArticleImage = image }; var response = requester.Post<string>(loginUrl, article); }
public static string EditArticle(string author, string title, string content, byte[] image, string sessionKey, int id) { string loginUrl = "articles/Update?sessionKey=" + sessionKey; ArticleModel article = new ArticleModel { Id=id, Author = author, Title = title, Content = content, ArticleImage = image }; var response = requester.Post<string>(loginUrl, article); return response; }