MCPcopy
hub / github.com/axios/axios / toURLEncodedForm

Function toURLEncodedForm

lib/helpers/toURLEncodedForm.js:7–19  ·  view source on GitHub ↗
(data, options)

Source from the content-addressed store, hash-verified

5import platform from '../platform/index.js';
6
7export default function toURLEncodedForm(data, options) {
8 return toFormData(data, new platform.classes.URLSearchParams(), {
9 visitor: function (value, key, path, helpers) {
10 if (platform.isNode && utils.isBuffer(value)) {
11 this.append(key, value.toString('base64'));
12 return false;
13 }
14
15 return helpers.defaultVisitor.apply(this, arguments);
16 },
17 ...options,
18 });
19}

Callers 1

index.jsFile · 0.85

Calls 3

toFormDataFunction · 0.85
toStringMethod · 0.80
appendMethod · 0.65

Tested by

no test coverage detected