public static CheckJobResponse ReadCheckJobResponse(HttpWebResponse httpResponse) { Stream stream = httpResponse.GetResponseStream(); StreamReader reader = new StreamReader(stream); var result = reader.ReadToEnd(); CheckJobResponse chkJob = JsonConvert.DeserializeObject <CheckJobResponse>(result); return(chkJob); }
public static CheckJobResponse CheckJobStatus(string jobid) { CheckJob job = new CheckJob(jobid, "true"); string url = "http://192.168.1.16:3000/submitjob/1"; string json = JsonConvert.SerializeObject(job); HttpWebResponse response = MakeHttpRequest(url, json, "POST"); CheckJobResponse chkJob = ReadCheckJobResponse(response); return(chkJob); }