📝 Edit page
➕ Add page
Event
Fields on the event object.
event.path- The request path.
- e.g.
/.netlify/functions/abc. - e.g. Requesting the ABC function with
/.netlify/functions/abc/def.jsonevent.path // "/.netlify/functions/abc/def.json" const name = event.path.split("/")[4]; // "def.json"
event.httpMethodthe request HTTP method e.g."GET".event.headersthe request headersevent.queryStringParameters- The request query parameters. e.g.
/.netlify/functions/abc?a=b&d=123as{ a: "b", d: 123 }. - For URL with
?myParam=foo, get withconst myParam = event.queryStringParameters.myParam;
- The request query parameters. e.g.
event.bodythe request body in JSON format. Such as if receiving data on a POST.