2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-05 16:42:32 +03:00

docs(helpers/AxiosURLSearchParams)

This commit is contained in:
Jay
2022-06-02 20:51:32 +02:00
parent 6f06e25f53
commit e8dd5cb1ed
+16
View File
@@ -2,6 +2,14 @@
var toFormData = require('./toFormData');
/**
* It encodes a string by replacing all characters that are not in the unreserved set with
* their percent-encoded equivalents
*
* @param {string} str - The string to encode.
*
* @returns {string} The encoded string.
*/
function encode(str) {
var charMap = {
'!': '%21',
@@ -17,6 +25,14 @@ function encode(str) {
});
}
/**
* It takes a params object and converts it to a FormData object
*
* @param {Object<string, any>} params - The parameters to be converted to a FormData object.
* @param {Object<string, any>} options - The options object passed to the Axios constructor.
*
* @returns {void}
*/
function AxiosURLSearchParams(params, options) {
this._pairs = [];