123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566(* This file is part of Dream, released under the MIT license. See LICENSE.md
for details, or visit https://github.com/aantron/dream.
Copyright 2021 Anton Bachin *)(* See also:
- SEARCH, https://tools.ietf.org/html/draft-snell-search-method-02
- Other WebDAV methods: COPY, LOCK, MKCOL, MOVE, PROPFIND, PROPPATCH,
UNLOCK. *)typemethod_=[|`GET|`POST|`PUT|`DELETE|`HEAD|`CONNECT|`OPTIONS|`TRACE|`PATCH|`Methodofstring]letmethod_to_string=function|`GET->"GET"|`POST->"POST"|`PUT->"PUT"|`DELETE->"DELETE"|`HEAD->"HEAD"|`CONNECT->"CONNECT"|`OPTIONS->"OPTIONS"|`TRACE->"TRACE"|`PATCH->"PATCH"|`Methodmethod_->method_letstring_to_method=function|"GET"->`GET|"POST"->`POST|"PUT"->`PUT|"DELETE"->`DELETE|"HEAD"->`HEAD|"CONNECT"->`CONNECT|"OPTIONS"->`OPTIONS|"TRACE"->`TRACE|"PATCH"->`PATCH|method_->`Methodmethod_letnormalize_methodmethod_=match(method_:>method_)with|`Method"GET"->`GET|`Method"POST"->`POST|`Method"PUT"->`PUT|`Method"DELETE"->`DELETE|`Method"HEAD"->`HEAD|`Method"CONNECT"->`CONNECT|`Method"OPTIONS"->`OPTIONS|`Method"TRACE"->`TRACE|`Method"PATCH"->`PATCH|`Method_asmethod_->method_|method_->method_letmethods_equalmethod_1method_2=normalize_methodmethod_1=normalize_methodmethod_2