コード例 #1
0
        public HttpResponse GetResponse()
        {
            var response = new HttpResponse(
                this.Request.ProtocolVersion, this.GetStatusCode(), this.GetContent(), ContentType);

            foreach (var responseHeader in this.ResponseHeaders)
            {
                response.AddHeader(responseHeader.Key, responseHeader.Value);
            }

            return response;
        }
コード例 #2
0
        public HttpResponse GetResponse()
        {
            var response =
                new HttpResponse(
                    this.Request.ProtocolVersion,
                    HttpStatusCode.OK,
                    this.Model.ToString(),
                    "text/plain; charset=utf-8");

            foreach (var responseHeader in this.ResponseHeaders)
            {
                response.AddHeader(responseHeader.Key, responseHeader.Value);
            }

            return response;
        }