[form-data-urlencoded]
Сonverts data form to application/x-www-form-urlencoded
. Lite version.
npm install form-data-urlencoded
import getFormData from 'form-data-urlencoded';
let data = {};
data["_csrf"] = 'wrwrwrvwg4657rhed4hehe4';
data["Res1[Test1]"] = 'segf96767';
data["Res2[Test2]"] = 'hello';
let form_data = getFormData(data);
var getFormData = require('form-data-urlencoded');
var data = {};
data["_csrf"] = 'wrwrwrvwg4657rhed4hehe4';
data["Res1[Test1]"] = 'segf96767';
data["Res2[Test2]"] = 'hello';
var form_data = getFormData(data);
Will be:
_csrf=wrwrwrvwg4657rhed4hehe4&Res1%5BTest1%5D=segf96767&Res2%5BTest2%5D=hello
If for you is useful thing, support the project.
PayPal | https://www.paypal.com/myaccount/transfer/send [email protected]
Visa Card | 4731 1856 1426 6432
First name and Last name: SEMINA TAMARA
or SEMINA TAMARA PETROVNA
Payeer | payeer.com No.[P77135727
]
PaYoneer | https://www.payoneer.com [email protected]
SEMINA TAMARA
MIT License
Copyright (c) 2017 TAMARA SEMINA
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.