RunKit + npm: wretch

node v8.17.0
endpointsharetweet
var wretch = require("wretch") var { URLSearchParams } = require('url') const urlParams = new URLSearchParams() urlParams.append('a', 1) urlParams.append('a', 2) console.log( 'Standard URLSearchParams: ' + urlParams.toString() ) const obj = { a: [1, 2] } wretch().polyfills({ URLSearchParams }) console.log( 'Wretch with the standard URLSearchParams: ' + wretch('/').query(obj)._url ) console.log( 'Wretch using your own custom string: ' + wretch('/').query('a=[1,2]')._url )
Created from: https://npm.runkit.com/wretch
Loading…