题目内容

urlString = 'http://localhost:8888/start?foo=bar&hello=world';console.log(url.parse(urlString, true).query);返回的是()。

A. /start?foo=bar&hello=world
B. foo=bar
C. { foo: 'bar', hello: 'world' }
D. ?foo=bar&hello=world

查看答案
更多问题

关于node.js的原生获得post数据的方式,正确的是()。

A. 通过req.body对象获得。
B. 通过解析req.url获得
C. 通过req.on监听data事件来获取
D. 必须在表单上添加enctype属性为multipart/form-data才能获得

Content-Type(内容类型),决定浏览器将以html网页形式、utf8编码读取这个文件,应该使用值()

A. 'text/html'
B. 'text/plain'
C. 'image/jpeg'
D. 'text/css'

http请求信息中,()表示请求的方式?

A. req.method
B. req.httpVersion
C. req.headers
D. req.url

http返回给客户端的信息中,()方法表示向请求发送内容。

A. res.writeHead()
B. res.end()
C. res.write()
D. res.on()

答案查题题库