티스토리 뷰

System.Net.HttpWebRequest wReq;

System.Net.HttpWebResponse wRes;


wReq = (System.Net.HttpWebRequest)System.Net.WebRequest.Create(new Uri("http://61.252.186.10/asp/getAspToonList.do?cp_code=testtoto&toon_type=popularity&toon_list_limit=30"));

wReq.Method = "GET";

wReq.ServicePoint.Expect100Continue = false;


using (wRes = (HttpWebResponse)wReq.GetResponse())

{

System.IO.Stream respPostStream = wRes.GetResponseStream();

     System.IO.StreamReader readerPost = new System.IO.StreamReader(respPostStream, Encoding.GetEncoding("utf-8"), true);

     JsonResult js = Json(readerPost.ReadToEnd(), JsonRequestBehavior.AllowGet);


     System.Web.Script.Serialization.JavaScriptSerializer serializer = new System.Web.Script.Serialization.JavaScriptSerializer();

     WingToonBestEntity wingToonBestEntity = new WingToonBestEntity();


     wingToonBestEntity = serializer.Deserialize<WingToonBestEntity>(js.Data.ToString());

     entity.WingToonBest = wingToonBestEntity;

}

반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2024/04   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
글 보관함