Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

128
Views
Node url.format method without decoding querystring

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);
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

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'
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!