Experience-Monks / Experience-Monks/devtool

impossible to inspect http requests

Open
#109 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
3.7k
Forks
147
PR merge metrics
No merged PRs in 30d

Description

I cannot log and inspect the HTTP requests executed by nodejs towards an external API.

I read your guide and the paragraph about [--browser-field and xhr-request](https://mattdesl.svbtle.com/debugging-nodejs-in-chrome-devtools#code-classprettyprintbrowserfieldcode_4), but I need to use [another HTTP client](https://github.com/request/request) because it is a [restful.js](https://github.com/marmelab/restful.js) dependency, and all the requests it executes are **not** logged in console and in the network devtool panel.

I tried the most simplified scenario that is the following:

```
require('request')('https://api.github.com/users/mattdesl/repos', function (error, response, body) {
console.log('request done', error, response, body)
});

require('xhr-request')('https://api.github.com/users/mattdesl/repos');

```

Just the second request is reported in devtool network panel and in console.
The first one is executed but I cannot trace it in devtool.
Is there is a solution?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.