@stephen-shopopop/node-metrics
    Preparing search index...

    Function buildContext

    • Builds a context object from the incoming HTTP request.

      Parameters

      • request: Request

        The incoming HTTP request object.

      Returns Promise<Context>

      A promise that resolves to a Context object containing:

      • method: The HTTP method of the request.
      • headers: An object representing the request headers.
      • path: The pathname of the request URL.
      • query: An object representing the query parameters.
      • body: An async function that parses and returns the JSON body of the request.