| 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
|
|
|
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
|
 |
 |
|
|
subject: response code: 400 from google images
|
|
|