I am parsing url with url.parse() and adding query to it, but when i format using url.format(), it encodes my query parameters and replace "+" with encoded value, is there any way to keep encoding in just url params
const parsedUrl = url.parse('localhost://0.0.0.0/products', true);
parsedUrl.query = { query: 'foo+bar' };
return url.format(parsedUrl);
node --version
v10.19.0
node
> const url=require('url')
undefined
> url.parse('localhost://0.0.0.0/products?query=foo+bar').query.split('=')[1]
'foo+bar'