To answer your questions as you asked them:

1) Yes, the RESTful interface supports POST requests. Via POST, you  
can submit source strings as long as 5,000 characters.

2) To fix the malformed request, make sure that your q string and  
langpair are urlencoded, even if you're using POST. Especially check  
to check that the vertical pipe ( | ) in the langpair. And regarding  
the url that's too long, make sure that your url, with all parameters  
correctly encoded, is coming in less than 2,000 characters. This  
shouldn't be a problem if you use POST, as long as you stay within the  
5K character limit.

Jeremy R. Geerdes
Effective website design & development
Des Moines, IA

For more information or a project quote:
http://jgeerdes.home.mchsi.com
http://jgeerdes.blogspot.com
http://jgeerdes.wordpress.com
[email protected]

Unless otherwise noted, any price quotes contained within this  
communication are given in US dollars.

If you're in the Des Moines, IA, area, check out Debra Heights  
Wesleyan Church!

And check out my blog, Adventures in Web Development, at 
http://jgeerdes.blogspot.com 
  !


On Nov 30, 2009, at 9:47 AM, Haisheng HU wrote:

> Hello, Group,
>
> I'm not talking about the AJAX function running at browser side. But
> I'm interested in the restful style API from the following location at
> server side.
> http://ajax.googleapis.com/ajax/services/language/translate
>
> So my questions are:
> 1) Does it support POST? You know, the GET method may have a length
> limit of 2000 characters. That's too short for translating an essay.
>
> 2) I occasionally encountered these two different errors while feeding
> different 'q' param (text to be translated). What's the cause of them?
> Your client has issued a malformed or illegal request.
> The requested URL /ajax/services/language/translate... is too large to
> process.
>
> Thanks in ad!
>
>
> ~haisheng
>
> --
>
> You received this message because you are subscribed to the Google  
> Groups "Google AJAX APIs" group.
> To post to this group, send email to [email protected] 
> .
> To unsubscribe from this group, send email to 
> [email protected] 
> .
> For more options, visit this group at 
> http://groups.google.com/group/google-ajax-search-api?hl=en 
> .
>
>

--

You received this message because you are subscribed to the Google Groups 
"Google AJAX APIs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-ajax-search-api?hl=en.


Reply via email to