node.js response.end() doesn't send message.

var server = http.createServer(function (req, res) {
    myfunction(arg1, function(data) {
        res.writeHead(200, {"Content-Type":"applicatioin/json"});
        res.end(data);
    });
});

If you run the above code, The data does not go to the client.

Why?

Check to see if your data is actually json. 'application/json' is the correct content type for json.

It would help me figure out if you could post a bit more of your code.