nodejs 简单文件下载
const http = require('http')
const url = require('url')
const fs = require('fs')
const path = require('path')
function getQueryObj(query) {
const queryObj = {}
if (query.length) {
const queryArr = query.split('&')
queryArr.forEach((e, i) => {
let oneQuery = e.split('=')
let key = oneQuery[0]
let value = oneQuery[1]
queryObj[key] = value
})
}
return queryObj
}
cons
nodejs 简单文件下载最先出现在Python成神之路。
共有 0 条评论