2019年8月4日
摘要: /** * @description querystring模块 */ const querystring = require('querystring'); const url = 'https://www.trip.com/things-to-do/list?searchtype=1&searchkey=2&cityid=58&keyword=disney'; const quer... 阅读全文
posted @ 2019-08-04 23:09 言先生 阅读(412) 评论(0) 推荐(0) 编辑
摘要: /** * @description fs模块常用api */ // fs所有的文件操作都是异步IO,如果要以同步的方式去调用,都会加一个在原同步api的基础上加Sync // 同步的方式会在最后传入一个callback,异步的方式不会传callback // 异步的缺陷就是无法控制异常,只能用try catch const fs = require('fs'); const path ... 阅读全文
posted @ 2019-08-04 22:53 言先生 阅读(244) 评论(0) 推荐(0) 编辑