• query - the parsed querystring, its format is specified by
    • body - the request payload, see Content-Type Parser for details on what request payloads Fastify natively parses and how to support other content types
    • params - the params matching the URL
    • - the headers getter and setter
    • raw - the incoming HTTP request from Node core
    • req (deprecated, use .raw instead) - the incoming HTTP request from Node core
    • server - The Fastify server instance, scoped to the current encapsulation context
    • id - the request ID
    • log - the logger instance of the incoming request
    • ip - the IP address of the incoming request
    • ips - an array of the IP addresses, ordered from closest to furthest, in the X-Forwarded-For header of the incoming request (only when the option is enabled)
    • - the protocol of the incoming request (https or http)
    • method - the method of the incoming request
    • url - the URL of the incoming request
    • routerMethod - the method defined for the router that is handling the request
    • routerPath - the path pattern defined for the router that is handling the request
    • is404 - true if request is being handled by 404 handler, false if it is not
    • connection - Deprecated, use socket instead. The underlying connection of the incoming request.
    • socket - the underlying connection of the incoming request
    • context - A Fastify internal object. You should not use it directly or modify it. It is useful to access one special key:
      • context.config - The route config object.
    1. console.log(request.body)
    2. console.log(request.params)
    3. console.log(request.headers)
    4. console.log(request.raw)
    5. console.log(request.server)
    6. console.log(request.id)
    7. console.log(request.ip)
    8. console.log(request.ips)
    9. console.log(request.hostname)
    10. console.log(request.protocol)
    11. console.log(request.url)
    12. console.log(request.routerMethod)
    13. console.log(request.routerPath)