PlainTextEndpoint.cs 415 B

12345678910111213141516
  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<string> HandleAsync()
  8. {
  9. Context.Response.StatusCode = 200;
  10. Context.Response.ContentType = "text/plain";
  11. Context.Response.ContentLength = 13;
  12. return Task.FromResult("Hello, World!");
  13. }
  14. }