You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given an instance of porcelain_endpoint, the plumber request handler that is run under the hood does not pass the entire plumber request to the endpoint handler, but rather extracts just the path args, query parameters and body and passes them along.
But sometimes it is useful to have access to the whole req object; for example, if using the plumber session_cookie hook to attach sessions to the request (available at req$session).
We could try and identify the extra parts of the request that a user might want and add them individally, as per the path args, query strings and body, but a simplier and more flexible solution would just be to allow porcelain endpoint handlers to optionally accept a req argument.
The text was updated successfully, but these errors were encountered:
Given an instance of
porcelain_endpoint
, theplumber
request handler that is run under the hood does not pass the entire plumber request to the endpoint handler, but rather extracts just the path args, query parameters and body and passes them along.But sometimes it is useful to have access to the whole
req
object; for example, if using the plumbersession_cookie
hook to attach sessions to the request (available atreq$session
).We could try and identify the extra parts of the request that a user might want and add them individally, as per the path args, query strings and body, but a simplier and more flexible solution would just be to allow porcelain endpoint handlers to optionally accept a
req
argument.The text was updated successfully, but these errors were encountered: