Please try to see what response status codes you are getting.
On Fri, Nov 12, 2010 at 10:45 PM, Pikoh <[email protected]> wrote:
> Well let's see. This is basically what i'm doing:
>
> HttpGet httpGet = new HttpGet("http://www.emtmalaga.es/portal/
> page/portal/EMT/Tiempos%20de%20espera?idParada=364<http://www.emtmalaga.es/portal/%0Apage/portal/EMT/Tiempos%20de%20espera?idParada=364>
> ");
>
> HttpResponse response= null;
> response = httpClient.execute(httpGet, localContext);
> reader = new BufferedReader(new
> InputStreamReader(response.getEntity().getContent()));
> while ((line = reader.readLine()) != null){
> result += line + "\n";
>
> }
>
> This simply returns nothing(result.length=0)
>
> i've tried this with the same result:
>
> uri = new URI("http", "//www.emtmalaga.es/portal/page/portal/EMT/
> Tiempos%20de%20espera?idParada=364<http://www.emtmalaga.es/portal/page/portal/EMT/%0ATiempos%20de%20espera?idParada=364>",
> null);
> url = uri.toURL();
> httpGet = new HttpGet(url2.toURI());
>
>
>
> On 12 nov, 17:51, Kumar Bibek <[email protected]> wrote:
> > How are you using it? I guess, you are doing something wrong.
> >
> > Also, when you replace spaces with %20, what status codes do you get?
> >
> >
> >
> > On Fri, Nov 12, 2010 at 10:16 PM, Pikoh <[email protected]> wrote:
> > > Hi Kumar,
> >
> > > With URLEncoder, HttpGet gave me "target host must not be null". It's
> > > strange, now i've found a solution using
> >
> > > url = new URL("http://www.emtmalaga.es/portal/page/portal/EMT/Tiempos
> > > %20de%20espera<
> http://www.emtmalaga.es/portal/page/portal/EMT/Tiempos%0A%20de%20espera>
> > > ");
> > > InputStream is=url.openStream();
> >
> > > I suppose using (%20) instead of spaces should work with HttpGet as
> > > it works using an InputStream but it simply returns nothing.
> >
> > > On 12 nov, 16:11, Kumar Bibek <[email protected]> wrote:
> > > > What is the error? UrlEncoder if used properly, should solve your
> > > problem.
> >
> > > > On Fri, Nov 12, 2010 at 8:40 PM, Pikoh <[email protected]> wrote:
> > > > > Hi all,
> >
> > > > > i'm stuck with this one. i just want to get this webpage ->
> > > > >http://www.emtmalaga.es/portal/page/portal/EMT/Tiemposdeespera
> > > > > into a string. I'm using HttpGet(url). First it threw me an error
> > > > > because of spaces, and i used %20 to replace them. Now it doesn't
> > > > > throw me any error, but it gets no data. I've tried also URLEncoder
> > > > > and "URL url = uri.toURL();" but still no result. Hope someone
> points
> > > > > me in the right direction.
> >
> > > > > --
> > > > > You received this message because you are subscribed to the Google
> > > > > Groups "Android Developers" group.
> > > > > To post to this group, send email to
> > > [email protected]
> > > > > To unsubscribe from this group, send email to
> > > > > [email protected]<android-developers%[email protected]>
> <android-developers%[email protected]<android-developers%[email protected]>
> >
> > > <android-developers%[email protected]<android-developers%[email protected]>
> <android-developers%[email protected]<android-developers%[email protected]>
> >
> >
> > > > > For more options, visit this group at
> > > > >http://groups.google.com/group/android-developers?hl=en
> >
> > > > --
> > > > Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com
> >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to
> [email protected]
> > > To unsubscribe from this group, send email to
> > > [email protected]<android-developers%[email protected]>
> <android-developers%[email protected]<android-developers%[email protected]>
> >
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
> >
> > --
> > Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>
--
Kumar Bibek
http://techdroid.kbeanie.com
http://www.kbeanie.com
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en