PlainTextEndpoint.cs 428 B

1234567891011121314151617
  1. using Reaper;
  2. using Reaper.Attributes;
  3. namespace Benchmark;
  4. [ReaperRoute(HttpVerbs.Get, "/plaintext")]
  5. public class PlainTextEndpoint : ReaperEndpointXR<string>
  6. {
  7. public override Task ExecuteAsync()
  8. {
  9. Context.Response.StatusCode = 200;
  10. Context.Response.ContentType = "text/plain";
  11. Context.Response.ContentLength = 13;
  12. Result = "Hello, World!";
  13. return Task.CompletedTask;
  14. }
  15. }