Ejemplo n.º 1
0
 private void ProcessResponse(HttpResponse httpResponse, ResponseBody body)
 {
     try
     {
         SetResponseHead(httpResponse);
         var buffer = ResponseFormater.Serialize(body);
         httpResponse.BinaryWrite(buffer);
     }
     catch (Exception error)
     {
         TraceLog.WriteError("Response handle error:{0}", error);
         httpResponse.StatusCode        = 500;
         httpResponse.StatusDescription = "Response error.";
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="context"></param>
 /// <param name="body"></param>
 /// <returns></returns>
 protected byte[] ProcessResponse(IHttpRequestContext context, ResponseBody body)
 {
     return(ResponseFormater.Serialize(body));
 }