为什么我运行这个js文件总是提示语法错误?貌似无法识别字符长度,但是怎么修改呢?
//运行结果如下

源代码如下
var http=require('http')
var querystring = require('querystring')
var postData =querystring.stringify({
'content':'光阴如梭',
'mid':2404
})
var options ={
hostname : 'www.imooc.com',
port:80,
path :'/course/docomment',
method:'POST',
headers:{
'Accept':'application/json, text/javascript, */*; q=0.01',
'Accept-Encoding':'gzip, deflate',
'Accept-Language':'zh-CN,zh;q=0.8,en;q=0.6',
'Cache-Control':'no-cache',
'Connection':'keep-alive',
'Content-Type':'application/x-www-form-urlencoded; charset=UTF-8'
'Content-Length':postData.length,
'Cookie':'imooc_uuid=2bb7fba3-edd3-4d93-8155-65fb56a50b38; imooc_isnew_ct=1473809150; last_login_username=geasstry%40163.com; PHPSESSID=989tf3nh4gddrevd1tr64vhd63; jwplayer.qualityLabel=è¶æ¸; loginstate=1; apsid=liYTc5NDYzOTQ5MWNkZTA3N2VmYjZlOGZhYjk3ZWUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMzA3NzU3MwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGJhNGY0MTNiMWQxYjZlYjY2MDNjNGE5OWNhODRlYWRmH7XcVx%2B13Fc%3DYT; IMCDNS=0; Hm_lvt_f0cfcccd7b1393990c78efdeebff3968=1473994315,1474067553,1474071933,1474079045; Hm_lpvt_f0cfcccd7b1393990c78efdeebff3968=1474082091; imooc_isnew=2; cvde=57dca9438bee2-21'
'Host':'www.imooc.com'
'Origin':'http://www.imooc.com'
'Referer':'http://www.imooc.com/video/2404'
'User-Agent':'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.95 Safari/537.36 Core/1.50.1233.400 QQBrowser/9.5.9092.400'
'X-Requested-With':'XMLHttpRequest'
}
}
var req =http.request(options,function(res){
console.log('status:'+res.statusCode);
console.log('headers:'+JSON.stringify(res.headers));
res.on('data',function(chunk){
console.log(Buffer.isBuffer(chunk))
console.log(typeof chunk);
})
res.on('end',function(){
console.log('评论完毕')
});
})
res.on('error',function(e){
console.log('Error:'+e.message)
})
req.write(postData);
req.end();