Skip to content

Yuriy-Svetlov/form-data-urlencoded

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Form data urlencoded

[form-data-urlencoded]

Сonverts data form to application/x-www-form-urlencoded. Lite version.

Get started

Install

npm install form-data-urlencoded

Examples how use

Example 1

	import getFormData from 'form-data-urlencoded';


        let data = {};
        data["_csrf"] = 'wrwrwrvwg4657rhed4hehe4';
        data["Res1[Test1]"] = 'segf96767';
        data["Res2[Test2]"] = 'hello';


	let form_data = getFormData(data);

Example 2

    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


Donate

Image If for you is useful thing, support the project.

PayPal | https://www.paypal.com/myaccount/transfer/send startpascal1@mail.ru

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 startpascal1@mail.ru


Bugs

Author

SEMINA TAMARA

License

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.

Releases

No releases published

Packages

No packages published