public static FilterResults deserializeFilterResults(string url, CookieContainer cookies) { string resultJson; HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); request.CookieContainer = cookies; HttpWebResponse response = (HttpWebResponse)request.GetResponse(); resultJson = readHttpResponse(response); FilterResults results = JsonConvert.DeserializeObject <FilterResults>(resultJson, new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore }); return(results); }
public static FilterResults deserializeFilterResults(string username, string password, string jql) { string resultJson; string url = "https://jira.kmiservicehub.com/rest/api/2/search?jql=" + jql + "&os_username="******"&os_password=" + password; HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); HttpWebResponse response = (HttpWebResponse)request.GetResponse(); resultJson = readHttpResponse(response); FilterResults results = JsonConvert.DeserializeObject <FilterResults>(resultJson, new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore }); return(results); }