Auth0 Node.js SDK - v5.0.0
    Preparing search index...

    Function withHeaders

    • Configure requests with custom headers. Can be used directly in object literals with spread syntax.

      Parameters

      • headers: Record<string, string>

        Object containing header key-value pairs

      Returns Partial<RequestOptions>

      Partial request options with the specified headers

      const reqOptions = {
      ...withHeaders({
      'X-Request-ID': 'unique-id-123',
      'X-Custom-Header': 'custom-value'
      }),
      timeoutInSeconds: 30
      };
      await client.actions.list({}, reqOptions);