Home > error 414 > error 414 google

Error 414 Google

Contents

von GoogleAnmeldenAusgeblendete FelderNach Gruppen oder Nachrichten suchen

von GoogleAnmeldenAusgeblendete FelderNach Gruppen oder Nachrichten suchen

here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more http://stackoverflow.com/questions/18404668/google-translate-api-error-414-request-uri-too-large-java about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Google Translate Api error 414 (Request-URI Too Large) java up vote 1 error 414 down vote favorite In official documentation of Google Translate Api for Java it says that we can use post-method to send more than 2K characters. https://developers.google.com/translate/v2/using_rest However when I try to translate text more than 2k length I get error 414 (Request-URI Too Large). StringBuilder sb = new StringBuilder(); HttpURLConnection connection = null; try { URL url = new URL("https://www.googleapis.com/language/translate/v2"); String urlParameters = "key=" + apiKey + "&source=" + shortLang1 vpn error 414 + "&target=" + shortLang2 + "&q=" + URLEncoder.encode(lyrics, "UTF-8"); connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("POST"); connection.setDoInput(true); connection.setDoOutput(true); connection.setUseCaches (false); connection.addRequestProperty("X-HTTP-Method-Override", "GET"); DataOutputStream wr = new DataOutputStream (connection.getOutputStream ()); wr.writeBytes (urlParameters); wr.flush (); wr.close (); BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream(), "UTF-8")); if (connection.getResponseCode() != 200) { return null; } String line; while ((line = reader.readLine()) != null) { sb.append(line + "\n"); } reader.close(); } catch (Exception e) { e.printStackTrace(); } finally { if (connection != null) { connection.disconnect(); } } UPDATE: I got it, the code above is right. Finally I realize that I got this error not from Google Translate service but from my proxy on Google App Engine. java post google-translate share|improve this question edited Aug 26 '13 at 9:03 asked Aug 23 '13 at 13:56 user1049280 1,55072444 add a comment| 1 Answer 1 active oldest votes up vote 0 down vote What the document you linked to is saying is that you use the POST method and you put the parameters into the request body ... not the request URL. Reference: How are parameters sent in an HTTP POST request? share|improve this answer answered Aug 23 '13 at 14:18 Stephen C 387k45411738 Thank you for reply, but I'm afraid I don't understand

 

Related content

error 414

Error table id toc tbody tr td div id toctitle Contents div ul li a href Error a li li a href Google Error a li li a href Iphone Error a li li a href Http Error Request-uri Too Large a li ul td tr tbody table p response Informational xx This class of status code indicates a provisional response consisting only of the Status-Line and optional headers and is terminated by an empty line relatedl There are no required headers for this class of status code p h id Error p Since HTTP did not define any xx

error 414 gmail

Error Gmail p Sign in relatedl Pricing Blog Support Search GitHub option form This repository Watch Star Fork ClockworkMod desksms-chrome Code Issues Pull requests Projects Pulse Graphs New issue Can't login error Open danepowell opened this Issue Mar middot comments Projects None yet option form Labels None yet option form Milestone No milestone option form Assignees No one assigned participant danepowell commented Mar I've used DeskSMS for a year or two with no problems Lately though I can't log in to the browser extension on Chrome I get the following error after selecting my gmail account and clicking allow That

error 414 fix

Error Fix table id toc tbody tr td div id toctitle Contents div ul li a href Google Error a li li a href Error Cisco Vpn Client a li li a href Request-uri Too Large Apache a li ul td tr tbody table p games PC games cisco vpn error Windows games Windows phone games Entertainment All Entertainment p h id Google Error p Movies TV Music Business Education Business Students educators p h id Error Cisco Vpn Client p Developers Sale Sale Find a store Gift cards Products Software services Windows Office Free downloads security Internet p h