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;
 }
Exemple #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;
 }
 public HttpResponse(HttpStatusCode statusCode, string contentType, HttpBody body) : this(statusCode, statusCode.ToString(), contentType, new Dictionary <string, string>(0, StringComparer.OrdinalIgnoreCase), body)
 {
 }
 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");
 }
Exemple #5
0
 public HttpResponse(HttpStatusCode statusCode, string contentType, HttpBody body) : this(statusCode, statusCode.ToString(), contentType, new Dictionary<string, string>(0, StringComparer.OrdinalIgnoreCase), body) { }
Exemple #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");
 }