I stole the essential piece of code from the web which sends the text to translate -
next I read the translation with -
It works sometimes but at other times, the web server sends back
Error 157 Error decoding translated text
. Is there a way to capture all the information sent when I click the translate button? Is there a better way?
posted 8 years ago
Welcome to JavaRanch.
Is there a way to capture all the information sent when I click the translate button?
Check out the LiveHTTPHeaders extension for Firefox.
As to the error, I am guessing that the URL is not properly encoded, because "frenchWord" contains some characters that shouldn't occur in an URL. Try "java.net.URLEncoder.encode(frenchWord, "UTF-8")" instead.