- 新增GetXToken函数用于生成x-api-eid-token - 实现HASH类用于计算128位哈希值 - 添加md5函数用于消息摘要计算 - 实现STrEnc函数用于字符串加密 - 添加getLastParameter与splitAndJoin辅助函数 - 构建完整的浏览器指纹对象生成逻辑 - 集成node-fetch与https-proxy-agent支持代理请求 - 实现完整的WebGL与浏览器环境模拟数据结构
81 lines
1.3 KiB
JavaScript
81 lines
1.3 KiB
JavaScript
/*!
|
|
* body-parser
|
|
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
|
* MIT Licensed
|
|
*/
|
|
|
|
'use strict'
|
|
|
|
/**
|
|
* @typedef Parsers
|
|
* @type {function}
|
|
* @property {function} json
|
|
* @property {function} raw
|
|
* @property {function} text
|
|
* @property {function} urlencoded
|
|
*/
|
|
|
|
/**
|
|
* Module exports.
|
|
* @type {Parsers}
|
|
*/
|
|
|
|
exports = module.exports = bodyParser
|
|
|
|
/**
|
|
* JSON parser.
|
|
* @public
|
|
*/
|
|
|
|
Object.defineProperty(exports, 'json', {
|
|
configurable: true,
|
|
enumerable: true,
|
|
get: () => require('./lib/types/json')
|
|
})
|
|
|
|
/**
|
|
* Raw parser.
|
|
* @public
|
|
*/
|
|
|
|
Object.defineProperty(exports, 'raw', {
|
|
configurable: true,
|
|
enumerable: true,
|
|
get: () => require('./lib/types/raw')
|
|
})
|
|
|
|
/**
|
|
* Text parser.
|
|
* @public
|
|
*/
|
|
|
|
Object.defineProperty(exports, 'text', {
|
|
configurable: true,
|
|
enumerable: true,
|
|
get: () => require('./lib/types/text')
|
|
})
|
|
|
|
/**
|
|
* URL-encoded parser.
|
|
* @public
|
|
*/
|
|
|
|
Object.defineProperty(exports, 'urlencoded', {
|
|
configurable: true,
|
|
enumerable: true,
|
|
get: () => require('./lib/types/urlencoded')
|
|
})
|
|
|
|
/**
|
|
* Create a middleware to parse json and urlencoded bodies.
|
|
*
|
|
* @param {object} [options]
|
|
* @return {function}
|
|
* @deprecated
|
|
* @public
|
|
*/
|
|
|
|
function bodyParser () {
|
|
throw new Error('The bodyParser() generic has been split into individual middleware to use instead.')
|
|
}
|