mirror of
https://github.com/tenrok/axios.git
synced 2026-06-20 20:00:40 +03:00
docs(helpers/AxiosURLSearchParams)
This commit is contained in:
@@ -2,6 +2,14 @@
|
|||||||
|
|
||||||
var toFormData = require('./toFormData');
|
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) {
|
function encode(str) {
|
||||||
var charMap = {
|
var charMap = {
|
||||||
'!': '%21',
|
'!': '%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) {
|
function AxiosURLSearchParams(params, options) {
|
||||||
this._pairs = [];
|
this._pairs = [];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user