this is the code

// Load the http module to create an http server.
var http = require('http');

// Configure our HTTP server to respond with Hello World to all requests.
var server = http.createServer(function (request, response) {
  response.writeHead(200, {'Content-Type': 'application/json'});
    response.write('{ "posts": [');
    response.write('] }');
        response.end();
});

// Listen on port 8000, IP defaults to 127.0.0.1
server.listen(8081);

// Put a friendly message on the terminal
console.log("Server running at http://127.0.0.1:8000/";);


In the Browser i obtain text/html, but I need text/plain


-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/fb7cb361-d771-4b87-85c5-88a23a2c307e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to