예제 #1
0
        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);
        }
예제 #2
0
        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);
        }