diff --git a/articles/rendering-output.html b/articles/rendering-output.html index 248fb88b..cd962d6f 100644 --- a/articles/rendering-output.html +++ b/articles/rendering-output.html @@ -601,7 +601,7 @@
{
- "letter": ["j"]
+ "letter": ["z"]
}
If we send a PUT
request and specify the
capital
parameter, a cookie will be set on the client which
diff --git a/articles/routing-and-input.html b/articles/routing-and-input.html
index 6e5030cb..65a49849 100644
--- a/articles/routing-and-input.html
+++ b/articles/routing-and-input.html
@@ -702,16 +702,29 @@
Only the first matched formal arguments are passed automatically to +the endpoint during execution. Duplicates are dropped. Query parameters +have priority over path parameters, then finally, body parameters are +matched last.
+While not required, it is recommended that endpoints have a function
+definition that only accepts the formals req
,
+res
, and ...
to avoid duplicates. If the
endpoint arguments are to be processed like a list, they are available
at req$argsBody
, with all arguments at
req$args
. req$args
is a combination of
list(req = req, res = res)
, req$argsPath
,
req$argsBody
, and req$argsQuery
.
Content-Type
HTTP header can be found as
req$HTTP_CONTENT_TYPE
.
-+diff --git a/articles/security.html b/articles/security.html index 4664bad0..f240f58a 100644 --- a/articles/security.html +++ b/articles/security.html @@ -215,7 +215,7 @@#* Return the value of a custom header #* @get / function(req){ @@ -746,9 +759,9 @@
Headers
Running
- +curl --header "customheader: abc123" http://localhost:8000
will return:You can print out the names of all of the properties attached to the request by running
print(ls(req))
inside an endpoint.Denial Of Service (DoS) -
This plot, with 10,000 points added, took 0.115 seconds to generate. +
This plot, with 10,000 points added, took 0.116 seconds to generate. While that doesn’t sound like much, if we exposed this API publicly on the Internet, an attacker could easily generate enough traffic on this endpoint to overwhelm the Plumber process. Even worse, an attacker could diff --git a/pkgdown.yml b/pkgdown.yml index 28441de9..d74d85cd 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -13,7 +13,7 @@ articles: routing-and-input: routing-and-input.html security: security.html tips-and-tricks: tips-and-tricks.html -last_built: 2023-11-17T15:36Z +last_built: 2023-11-17T15:53Z urls: reference: https://www.rplumber.io/reference article: https://www.rplumber.io/articles diff --git a/reference/endpoint_serializer.html b/reference/endpoint_serializer.html index 4a6e87a1..624af674 100644 --- a/reference/endpoint_serializer.html +++ b/reference/endpoint_serializer.html @@ -171,7 +171,7 @@
Examples#> } #> }) #> } -#> <bytecode: 0x5619c1d20068> +#> <bytecode: 0x565160a62c30> #> <environment: namespace:plumber>