public Response(Code C, IStreamableContent body) { httpCode = C; this.httpBody = body; this.AddInstruction(new Instruction("Server", "Sabertooth")); this.AddInstruction(new Instruction("Date", DateTime.Now.ToString("R"))); }
protected bool SaveFile(string urlpath, IStreamableContent isc) { string fullpath = Path.Combine(AssetSubdir, urlpath); if (File.Exists(fullpath)) { return(false); } else { using (FileStream FS = File.Create(fullpath)) { isc.StreamTo(FS); } return(true); } }
public ClientReturn(IStreamableContent body) { this.body = body; }
public void SetBody(IStreamableContent ICS) { this.httpBody = ICS; }
public void SetBody(byte[] B, MIME M) { this.httpBody = new GeneratedResource(B, M); }