GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — web specs better util.inspect output · Issue #2917 · nodejs/undici

web specs better util.inspect output #2917

New issue
Copy link
New issue
Copy link
Closed
Closed
web specs better util.inspect output#2917
Copy link
Labels
enhancementNew feature or requestfetchgood first issueGood for newcomers

Description

@KhafraDev
KhafraDev
opened on Mar 4, 2024
Issue body actions

Example console output:

Details
> new Response(null)
Response {
  [Symbol(realm)]: { settingsObject: {} },
  [Symbol(state)]: {
    aborted: false,
    rangeRequested: false,
    timingAllowPassed: false,
    requestIncludesCredentials: false,
    type: 'default',
    status: 200,
    timingInfo: null,
    cacheState: '',
    statusText: '',
    headersList: HeadersList {
      cookies: null,
      [Symbol(headers map)]: Map(0) {},
      [Symbol(headers map sorted)]: null
    },
    urlList: []
  },
  [Symbol(headers)]: HeadersList {
    cookies: null,
    [Symbol(headers map)]: Map(0) {},
    [Symbol(headers map sorted)]: null
  }
}

> new Headers()
HeadersList {
  cookies: null,
  [Symbol(headers map)]: Map(0) {},
  [Symbol(headers map sorted)]: null
}

> new Request('http://a')
Request {
  [Symbol(realm)]: {
    settingsObject: { baseUrl: undefined, origin: [Getter], policyContainer: [Object] }
  },
  [Symbol(state)]: {
    method: 'GET',
    localURLsOnly: false,
    unsafeRequest: false,
    body: null,
    client: { baseUrl: undefined, origin: [Getter], policyContainer: [Object] },
    reservedClient: null,
    replacesClientId: '',
    window: 'client',
    keepalive: false,
    serviceWorkers: 'all',
    initiator: '',
    destination: '',
    priority: null,
    origin: 'client',
    policyContainer: 'client',
    referrer: 'client',
    referrerPolicy: '',
    mode: 'cors',
    useCORSPreflightFlag: false,
    credentials: 'same-origin',
    useCredentials: false,
    cache: 'default',
    redirect: 'follow',
    integrity: '',
    cryptoGraphicsNonceMetadata: '',
    parserMetadata: '',
    reloadNavigation: false,
    historyNavigation: false,
    userActivation: false,
    taintedOrigin: false,
    redirectCount: 0,
    responseTainting: 'basic',
    preventNoCacheCacheControlHeaderModification: false,
    done: false,
    timingAllowFailed: false,
    headersList: HeadersList {
      cookies: null,
      [Symbol(headers map)]: Map(0) {},
      [Symbol(headers map sorted)]: null
    },
    urlList: [ [URL] ],
    url: URL {
      href: 'http://a/',
      origin: 'http://a',
      protocol: 'http:',
      username: '',
      password: '',
      host: 'a',
      hostname: 'a',
      port: '',
      pathname: '/',
      search: '',
      searchParams: URLSearchParams {},
      hash: ''
    }
  },
  [Symbol(signal)]: AbortSignal { aborted: false },
  [Symbol(headers)]: HeadersList {
    cookies: null,
    [Symbol(headers map)]: Map(0) {},
    [Symbol(headers map sorted)]: null
  }
}

> a = new FormData()
FormData { [Symbol(state)]: [] }
> a.append('a', 'b')
undefined
> a
FormData { [Symbol(state)]: [ { name: 'a', value: 'b' } ] }

It's pretty bad. A lot of internal implementation specifics are exposed and not too much useful information. Headers inspects its own HeadersList so it doesn't even say Headers { ... }.

  • Headers
  • FormData
  • Response
  • Request

Activity

  1. KhafraDev
    added
    enhancementNew feature or request
    good first issueGood for newcomers
    fetch
    on Mar 4, 2024
  2. BenzeneAlcohol commented on Mar 5, 2024

    @BenzeneAlcohol
    BenzeneAlcohol
    on Mar 5, 2024
    More actions

    I would like to take this up if no one is working on this issue.

    Reacted by Carlos Fuentes
  3. metcoder95 commented on Mar 5, 2024

    @metcoder95
    metcoder95
    on Mar 5, 2024
    Member
    More actions

    Do not forget to add tests 🙂

    Reacted by Muthukumar
  4. mertcanaltin commented on Mar 14, 2024

    @mertcanaltin
    mertcanaltin
    on Mar 14, 2024
    Member
    More actions

    I think we can close this place @KhafraDev

  5. KhafraDev
    closed this as completedon Mar 14, 2024
  6. Uzlopak commented on Mar 14, 2024

    @Uzlopak
    Uzlopak
    on Mar 14, 2024
    Contributor
    More actions

    Beautiful ❤️

    Reacted by Mert Can Altin
    Reacted by Mert Can Altin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestfetchgood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.