File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

response code: 400 from google images

 
Miran Cvenkel
Ranch Hand
Posts: 176
1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
address = "http://images.google.com/images?q="Arcyptera fusca""


-->


No need to tell, if I put that address into browser it works.
Should that work, I tryed to escape, no effect ?
 
Campbell Ritchie
Sheriff
Pie
Posts: 47274
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try changing the space to its HTML escape which is something like %20.
 
Miran Cvenkel
Ranch Hand
Posts: 176
1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah, managed to do it:
 
Rob Spoor
Sheriff
Pie
Posts: 20381
46
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Campbell Ritchie wrote:Try changing the space to its HTML escape which is something like %20.

It's %22 for double quotes.

Miran Cvenkel wrote:Yeah, managed to do it:

You can also use URLEncoder:
Unfortunately there is an UnsupportedEncodingException that can be thrown so you'd need to handle that. However, it's a sub class of IOException, and you probably already have to handle IOException for the rest of the networking code, so that shouldn't be a problem.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic