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

103
Views
How to do a request using a URI string containing / in javascript

Hi I was trying to do a request using a URI string existing uit of an array of user Input. The array existing uit of objects with the form :

{
'name':string,
'value':string
}

Both strings can however contain the "/" character and quite often will as well as any other character that is illegal in an URI. I however want to make a request with the URI. To overcome the problem I tried using encodeURI :

let uri = JSON.stringify([{"name":"someName","value":"some strange characters /+-*°²³"}])
let request = 'things/'+encodeURI(uri)
console.log(request)
But if you look at the output you can clearly see that there are still illegal characters present in the request where they should not be. Does anyone know a solution to this problem? Thanks in advance.

about 4 years ago · Juan Pablo Isaza
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!