Request
, Response
, and others; it does not have a DOM and is not a Node.js runtime. This is part of the reason (among many) that Outsmartly is able to offer the performance it does.OutsmartlyInterceptEvent
. The OutsmartlyInterceptEvent
contains additional information such as the OutsmartlyRequest
object, OutsmartlyEdgeVisitor
, helpers for cookies, and more./github-proxy/
and we use the *
asterisk to signal we want to match anything that comes after it, including slashes. We can then get access to the value at event.request.outsmartly.params[0]
./github-proxy/:path
instead, and made a request to /github-proxy/users/outsmartly
, :path
would not have matched. If you used :path*
instead, it would match and the users
part would be available at event.request.outsmartly.params.path
and anything that comes after, such as /outsmartly
can be found in event.request.outsmartly.params[0]
. This is the same behavior of Express.someHowQueryDatabaseForUser(userId)
to query our database, then format the result as a JSON response.