|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 13 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
542 bytes
|
| Line | |
|---|
| 1 | 'use strict';
|
|---|
| 2 |
|
|---|
| 3 | import utils from '../utils.js';
|
|---|
| 4 | import toFormData from './toFormData.js';
|
|---|
| 5 | import platform from '../platform/index.js';
|
|---|
| 6 |
|
|---|
| 7 | export 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 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.