Skip to content

Instantiation of Agent without parameter caused an error #12918

@zkd8907

Description

@zkd8907
  • Version: found at v7.10.0
  • Platform: 64-bit Windows 10/7
  • Subsystem: https

When I run the code below, it causes an error: Type Error: Cannot read property 'maxCachedSessions' of undefined.

new require('https').Agent();

According to document, The parameter options of new Agent is not required. So I think the error should not be raised.

reference
An Agent object for HTTPS similar to http.Agent. See https.request() for more information. (Class: https.Agent)
new Agent([options]) (new Agent([options]))

Metadata

Metadata

Assignees

No one assigned

    Labels

    httpsIssues or PRs related to the https subsystem.questionIssues that look for answers.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions