This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes HTTP POST problems Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "HTTP POST problems" Watch "HTTP POST problems" New topic
Author

HTTP POST problems

Shayne MacAndrew
Greenhorn

Joined: Jun 03, 2004
Posts: 1
Hi,

I have just written a program which translates a word from French to English using the Altavista Babelfish translation website http://babelfish.altavista.com/babelfish/tr

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?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39578
    
  27
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.


Ping & DNS - updated with new look and Ping home screen widget
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HTTP POST problems
 
Similar Threads
Doubt in Webservices Java Web Services Developer Pack 1.3 Example
i18n and Properties file
translating propertry files using saaj api
How to use Babelfish web service for Chinese ...
To the Germans out here