Computer scienceBackendNode.jsCore ConceptsInternal modulesHTTP serverhttp module

Introduction to the HTTP module

Complete the code

Report a typo

Take a look at the code snippet below.

http.get('https://myawesomeapi.site/cats/1', (res) => {
  res.on('data', (cat) => {
    console.log(/* your answer here */.toString());
  });
});

You need to write the answer to replace the comment /* your answer here */ that will complete this code and make it functional.

Enter a short text
___

Create a free account to access the full topic