-2

I am using URL in one format. but when I enter it in Google and when pressed enter it is converting to another format.

below is my original URL

'https://translation.googleapis.com/language/translate/v2?q=hai basha.how are  you&target=te&key={YOUR_API_KEY}'

below is my encoded url

'https://translation.googleapis.com/language/translate/v2?q=hai%20basha.how%20are%20you&target=te&key={YOUR_API_KEY}'

how can I implement this in my code. Actually it is a GET method.

Dumbo
  • 1,630
  • 18
  • 33
basha
  • 587
  • 2
  • 6
  • 25

1 Answers1

-1

you can use String.replace method to change characters to their respective special character notation. and make a call through get or post or what ever you want.

Karthik
  • 1,088
  • 6
  • 17