aspose file tools
The moose likes Java in General and the fly likes  response code: 400 from google images Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark " response code: 400 from google images" Watch " response code: 400 from google images" New topic
Author

response code: 400 from google images

Miran Cvenkel
Ranch Hand

Joined: Nov 23, 2010
Posts: 138
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 ?


Searchable nature photo gallery: http://agrozoo.net/jsp/Galery.jsp?l2=en
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 32717
    
    4
Try changing the space to its HTML escape which is something like %20.
Miran Cvenkel
Ranch Hand

Joined: Nov 23, 2010
Posts: 138
Yeah, managed to do it:
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19216

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.


SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: response code: 400 from google images
 
Similar Threads
BOW TO ME!
Trying out smilies
Servers down? Pants too?
URL reader error in my web application
Fav comic book character....