예제 #1
0
 public HttpResponse(HttpStatusCode statusCode,
                     string statusDescription,
                     string contentType,
                     IDictionary <string, string> headers, //TODO: copy or ref
                     HttpBody body)
 {
     StatusCode        = statusCode;
     StatusDescription = statusDescription;
     ContentType       = contentType;
     Headers           = headers;
     Body = body;
 }
예제 #2
0
 public HttpResponse(HttpStatusCode statusCode,
                     string statusDescription,
                     string contentType,
                     IDictionary<string, string> headers, //TODO: copy or ref
                     HttpBody body)
 {
     StatusCode = statusCode;
     StatusDescription = statusDescription;
     ContentType = contentType;
     Headers = headers;
     Body = body;
 }
예제 #3
0
 public HttpResponse(HttpStatusCode statusCode, string contentType, HttpBody body) : this(statusCode, statusCode.ToString(), contentType, new Dictionary <string, string>(0, StringComparer.OrdinalIgnoreCase), body)
 {
 }
예제 #4
0
 FileResponse(FileInfo fileInfo, HttpBody body) : base(HttpStatusCode.OK, MimeTypes.GetMimeType(fileInfo.Name), body)
 {
     Filename     = fileInfo.Name;
     LastModified = fileInfo.LastWriteTimeUtc;
     Headers[HttpHeader.LastModified] = LastModified.ToString("R");
 }
예제 #5
0
 public HttpResponse(HttpStatusCode statusCode, string contentType, HttpBody body) : this(statusCode, statusCode.ToString(), contentType, new Dictionary<string, string>(0, StringComparer.OrdinalIgnoreCase), body) { }
예제 #6
0
 FileResponse(FileInfo fileInfo, HttpBody body) : base(HttpStatusCode.OK, MimeMapping.GetMimeMapping(fileInfo.Name), body)
 {
     Filename = fileInfo.Name;
     LastModified = fileInfo.LastWriteTimeUtc;
     Headers[HttpHeader.LastModified] = LastModified.ToString("R");
 }