Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

response code: 400 from google images

 
Miran Cvenkel
Ranch Hand
Posts: 198
2
  • 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: 48968
60
  • 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: 198
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah, managed to do it:
 
Rob Spoor
Sheriff
Pie
Posts: 20531
54
Chrome Eclipse IDE Java Windows
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic