diff options
author | Minteck <contact@minteck.org> | 2022-08-21 17:31:56 +0200 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2022-08-21 17:31:56 +0200 |
commit | a2df9a69dcc14cb70118cda2ded499055e7ee358 (patch) | |
tree | 6dd283e4e9452d38bce81ddaaae49b5335755842 /together/node_modules/superagent/lib/node/parsers/urlencoded.js | |
parent | 84dd0735820b16b60f600284d35183d76547a71f (diff) | |
download | pluralconnect-a2df9a69dcc14cb70118cda2ded499055e7ee358.tar.gz pluralconnect-a2df9a69dcc14cb70118cda2ded499055e7ee358.tar.bz2 pluralconnect-a2df9a69dcc14cb70118cda2ded499055e7ee358.zip |
m. update
Diffstat (limited to 'together/node_modules/superagent/lib/node/parsers/urlencoded.js')
-rw-r--r-- | together/node_modules/superagent/lib/node/parsers/urlencoded.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/together/node_modules/superagent/lib/node/parsers/urlencoded.js b/together/node_modules/superagent/lib/node/parsers/urlencoded.js new file mode 100644 index 0000000..88a2475 --- /dev/null +++ b/together/node_modules/superagent/lib/node/parsers/urlencoded.js @@ -0,0 +1,22 @@ +"use strict"; + +/** + * Module dependencies. + */ +const qs = require('qs'); + +module.exports = (res, fn) => { + res.text = ''; + res.setEncoding('ascii'); + res.on('data', chunk => { + res.text += chunk; + }); + res.on('end', () => { + try { + fn(null, qs.parse(res.text)); + } catch (err) { + fn(err); + } + }); +}; +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJxcyIsInJlcXVpcmUiLCJtb2R1bGUiLCJleHBvcnRzIiwicmVzIiwiZm4iLCJ0ZXh0Iiwic2V0RW5jb2RpbmciLCJvbiIsImNodW5rIiwicGFyc2UiLCJlcnIiXSwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvbm9kZS9wYXJzZXJzL3VybGVuY29kZWQuanMiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBNb2R1bGUgZGVwZW5kZ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