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 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"); }
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, MimeMapping.GetMimeMapping(fileInfo.Name), body) { Filename = fileInfo.Name; LastModified = fileInfo.LastWriteTimeUtc; Headers[HttpHeader.LastModified] = LastModified.ToString("R"); }