Place the lines of code in the right order to set 'Content-Type': 'application/json' header for the response.
Creation of HTTP server
writeHead order
Report a typo
Put the items in the correct order
response.writeHead(200, {'Content-Type': 'text/html'});response.writeHead(200, {'Content-Type': 'application/json'});http.createServer((request, response) => {response.end();}).listen(8080); ___
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.