Properties
id
id
Transaction ID Example: dc6128b3-bdcb-464d-a1e1-009b041ff9b9
stage
stage
If you are working with API Gateway Stages, it will contain a value. Example: develop
.
If you set no stage in the Gateway API by default it will be empty.
method
method
Identifies the HTTP Method. Possible values: GET
, PUT
, POST
, etc.
path
path
Identify the URL. Example: /users
.
query
query
Returns in an object all parameters that were passed in the URL query. Example: {id: 100}
params
params
By default, return an empty object. If you do not work with the API
class to be able to assign it a value must use the function: getRouteParams(route, path)
.
headers()
headers()
Returns an array of all headers in the request. Header names will be lowercase.
body
body
Returns an object with all the parameters returned in the request body. Only works with content-type
application/json
or application/x-www-form-urlencoded
.
NOTE: Doesn't support binary content. Example: files.
host
host
Returns the host that invoked the request.
If ALB, the DNS will return.
If API Gateway will return the domain.
ip
ip
Returns the first ip found in the request.
userAgent
userAgent
Returns the User-Agent
sent in the header.
proxyIntegration
proxyIntegration
Identifies what integration your Lambda has.
The values to return are: elb
or apigw-rest-api
or apigw-http-api
.
isBase64Encoded
isBase64Encoded
A Boolean value that identifies whether the body is in base64
log
log
Property that allows you to manage the log on each request.
connectionId
connectionId
Property that returns the id of the socket connection. This value can be nullable
route
route
property that returns the router key to be used with the ApiSocket
.
Last updated
Was this helpful?