D
D
Denis11112018-08-18 14:10:42
Node.js
Denis1111, 2018-08-18 14:10:42

Header name must be a valid http token? What to do?

const http = require('http');
const hostname = '127.0.0.1';
const port = 3000;
const server = http.createServer((req, res) => {
res.statusCode = 200;
res.setHeader('content-type', 'text/plain');
res.end('Hello world!');
} );
server.listen(port, hostname, () => {
console.log("Server started");
});
https://pp.userapi.com/c850032/v850032824/58134/F7...

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question