HttpUtils.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334
  1. //Copyright (c) Service Stack LLC. All Rights Reserved.
  2. //License: https://raw.github.com/ServiceStack/ServiceStack/master/license.txt
  3. using System;
  4. using System.Collections.Generic;
  5. namespace ServiceStack
  6. {
  7. internal static class HttpMethods
  8. {
  9. static readonly string[] allVerbs = new[] {
  10. "OPTIONS", "GET", "HEAD", "POST", "PUT", "DELETE", "TRACE", "CONNECT", // RFC 2616
  11. "PROPFIND", "PROPPATCH", "MKCOL", "COPY", "MOVE", "LOCK", "UNLOCK", // RFC 2518
  12. "VERSION-CONTROL", "REPORT", "CHECKOUT", "CHECKIN", "UNCHECKOUT",
  13. "MKWORKSPACE", "UPDATE", "LABEL", "MERGE", "BASELINE-CONTROL", "MKACTIVITY", // RFC 3253
  14. "ORDERPATCH", // RFC 3648
  15. "ACL", // RFC 3744
  16. "PATCH", // https://datatracker.ietf.org/doc/draft-dusseault-http-patch/
  17. "SEARCH", // https://datatracker.ietf.org/doc/draft-reschke-webdav-search/
  18. "BCOPY", "BDELETE", "BMOVE", "BPROPFIND", "BPROPPATCH", "NOTIFY",
  19. "POLL", "SUBSCRIBE", "UNSUBSCRIBE" //MS Exchange WebDav: http://msdn.microsoft.com/en-us/library/aa142917.aspx
  20. };
  21. public static HashSet<string> AllVerbs = new HashSet<string>(allVerbs);
  22. public const string Get = "GET";
  23. public const string Put = "PUT";
  24. public const string Post = "POST";
  25. public const string Delete = "DELETE";
  26. public const string Options = "OPTIONS";
  27. public const string Head = "HEAD";
  28. public const string Patch = "PATCH";
  29. }
  30. }