(data, options)
| 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 | } |
no test coverage detected