So I want to make my string like "abc 123 def"
to be "abc%20123%20def"
so can use it as query parameter in my http request like this
https://myBaseUrl.com?parameter=abc%20123%20def"
how to do that ?
I have tried using this
val myString = "321 pop"
val enCodedString = URLEncoder.encode(myString, "utf-8")
but if I print, it will produce string like this "321+pop"
Java or Kotlin are OK