You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
577 B

8 months ago
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. namespace Apewer.Web
  5. {
  6. /// <summary>表示 API 行为结果,主体为文本。</summary>
  7. public class TextResult : BytesResult
  8. {
  9. /// <summary>创建结果实例。</summary>
  10. public TextResult(string text, string contentType = "text/plain") : base(text.Bytes(), contentType) { }
  11. /// <summary>创建结果实例。</summary>
  12. public TextResult(int status, string text, string contentType = "text/plain") : base(status, text.Bytes(), contentType) { }
  13. }
  14. }