Sort the code fragments to make a GET request that sends messages to the console with the server response.
Sending requests
Get request puzzle
Report a typo
Put the items in the correct order
const http = require('node:http');http.get('http://api-server.com/', (res) => {}); let response = ''; res.on('data', (chunk) => { response += chunk; }); res.on('end', () => console.log(JSON.parse(response))); ___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.