Skip to content

Feature request: custom toJSON() method for request.info #4019

Description

@cjihrig

Support plan

  • which support plan is this issue covered by? Community
  • is this issue currently blocking your project? yes - blocking an update to hapi 19
  • is this issue affecting a production system? not yet

Context

  • node version: 12.14.1
  • module version: 19.0.1
  • environment: node
  • used with: hapi application
  • any other relevant information:

What problem are you trying to solve?

hapi 19 breaks JSON.stringify(request.info). This commit seems like the culprit, as it adds circular structures to request.info.

Do you have a new or modified API suggestion to solve the problem?

Adding a custom toJSON() function to internals.Info should fix the problem I think. I'm happy to send a PR.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugBug or defect

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions