Http Client example
Antwort
14.09.15 09:26
Hi Guys,

  Have you tested the Http Client App before, I used my Iphone as the hotspot for accessing the internet. The demo application can access the internet, get the ip address and get the address of the server also. But at the end the error information "error occurred in downloading HTML" shows up.

 Do yo have any idea about this error?


Ken
0 (0 Stimmen)
Http Client example
Antwort
14.09.15 18:26 als Antwort auf kun wang.
Hi Ken,

if all this steps beofre work, did you try to downlad the HTML manually on your laptop?

Which address are you trying to access?

- Florian
0 (0 Stimmen)
Http Client example
Antwort
15.09.15 06:55 als Antwort auf Florian Harr.
Hi Florian,

  I'm testing the example project "HCA_httpClientAPP", the accessing address is "www.posttestserver.com"

  Do you haev any advice for it?



ken
0 (0 Stimmen)
Http Client example
Antwort
17.09.15 05:27 als Antwort auf kun wang.
Ken,

did you change anything on the source code?

The reason I'm asking is that the example as provided works fine for me.

- Florian
0 (0 Stimmen)
RE: Http Client example
Antwort
08.08.16 15:18 als Antwort auf Florian Harr.

Hi,

I'm trying to use the HttpExampleClient. I can successfully connect to my WiFi network and I also get the Ip adreess printed on the console but after that I'm getting this message:

40 [PIP:2] error in Get host IP by name -159.

Any hints?

Thanks in advance

 

 

0 (0 Stimmen)
RE: Http Client example
Antwort
08.08.16 20:33 als Antwort auf Lidia Cerqueira.

Hello Lidia,

the HttpExampleClient should work right out of the box.
error in get host IP by name” means that the XDK is unable to resolve the URL of your server.
Please take a look at line 222 in HttpExampleClient.c.

PAL_getIpaddress((uint8_t*) "www.yourServer.com", &destAddr)

Make sure, that there is no typo in the URL www.yourServer.com.
If this is not the case and the example still doesn’t work, please check that the DNS in your Wi-Fi network is working.

Therefore, log in with a device of your choice, open a browser and try to resolve www.google.de.

Please tell me, if you get it working.

Kind regards,
Manuel

0 (0 Stimmen)
RE: Http Client example
Antwort
09.08.16 07:45 als Antwort auf Manuel Cerny.
I was trying to use the www.posttestserver.com. Isn't it a valid server?
0 (0 Stimmen)
RE: Http Client example
Antwort
09.08.16 11:49 als Antwort auf Lidia Cerqueira.

Hello Lidia,

www.posttestserver.com is a placeholder like www.yourServer.com. Nevertheless they both are valid and can be resolved.
The HttpClientExample shows how to download a specific HTML file from a URL.

Please check, if the DNS server is working in general in your network.

Kind regards,
Manuel

 

0 (0 Stimmen)
RE: Http Client example
Antwort
09.08.16 12:55 als Antwort auf Manuel Cerny.

Thanks Manuel, problem solved!

Is there any restriction on the websites that can be donwloaded?

I've tried a few http websites but I either get the message "error occurred in downloading HTML" or I  the html:

<html>
 <head>
...
 <body>
<div class="page page-missing">
         <h1>Site Not Found</h1>
         <p>Well, this is awkward. The site you're looking for is not here.</p>
...
 </body>

Thanks

0 (0 Stimmen)
RE: Http Client example
Antwort
09.08.16 20:23 als Antwort auf Lidia Cerqueira.

Hello Lidia,

due to my knowledge, the URL needs to be resolvable and there must not be a redirect to https.
Note that https is currently not supported of the XDK and therefore a HTML can not be requested via https.

Please don't hesitate to open new threads for new topics.

Kind regards,
Manuel

0 (0 Stimmen)