Skip to content

Commit 27a7133

Browse files
committed
http/util: Add is_safe_method function
1 parent 6d3fab4 commit 27a7133

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

modules/http.util.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ print(http_util.dict_to_query({foo = "bar"; baz = "qux"})) --> "baz=qux&foo=bar"
4545
### `resolve_relative_path(orig_path, relative_path)` <!-- --> {#http.util.resolve_relative_path}
4646

4747

48+
### `is_safe_method(method)` <!-- --> {#http.util.is_safe_method}
49+
50+
Returns a boolean indicating if the passed string `method` is a "safe" method.
51+
See [RFC 7231 section 4.2.1](https://tools.ietf.org/html/rfc7231#section-4.2.1) for more information.
52+
53+
4854
### `scheme_to_port` <!-- --> {#http.util.scheme_to_port}
4955

5056
Map from schemes (as strings) to default ports (as integers).

0 commit comments

Comments
 (0)