摘要: 要使用 HTTP 服务器与客户端,需要 require('http')。 Node.js 中的 HTTP 接口被设计成支持协议的许多特性。 比如,大块编码的消息。 这些接口不缓冲完整的请求或响应,用户能够以流的形式处理数据。 HTTP 消息头由一个对象表示,例如: 键名是小写的,键值不能修改。 为了 阅读全文
posted @ 2017-09-22 21:23 昕泽 阅读(1786) 评论(0) 推荐(0) 编辑
摘要: fs.readFile(path[, options], callback) path <string> | <Buffer> | <URL> | <integer> 文件名或文件描述符。 options <Object> | <string> encoding <string> | <null>  阅读全文
posted @ 2017-09-22 21:21 昕泽 阅读(126) 评论(0) 推荐(0) 编辑