protected FormiumResponse StatusCode(int code) { var response = new FormiumResponse(); response.Status = code; return(response); }
protected FormiumResponse Content(byte[] content, string contentType) { var response = new FormiumResponse(); response.MimeType = contentType; response.ContentStream = new MemoryStream(content); return(response); }
protected FormiumResponse Json(object data) { var response = new FormiumResponse(); response.MimeType = "application/json"; response.ContentStream = new MemoryStream(Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(data))); return(response); }