예제 #1
0
 public void ProcessRequest(HttpContext context)
 {
     context.Response.ContentType = "text/plain";
     if (String.IsNullOrEmpty(context.Request.QueryString["q"])) return;
     var svc = new SearchService();
     var search = svc.GeSearchResult(context.Request.QueryString["q"].Trim());
     var res = JsonConvert.SerializeObject(search);
     context.Response.Write(res);
 }
예제 #2
0
        public void GetSearchResult()
        {
            var res = new SearchService().GeSearchResult("honda");

             Console.WriteLine(JsonConvert.SerializeObject(res, Formatting.Indented));
        }