8 years ago.

mbed OS 5 HTTP Client example does not work

I imported the mbed OS 5 HTTP Client example here https://developer.mbed.org/teams/mbed-os-examples/code/mbed-os-example-sockets/ into the online IDE and it compiles but does not work giving the following output

Ethernet socket example

IP address is: 192.168.1.13

sent 45 [GET / HTTP/1.1]

recv 64 [HTTP/1.1 301 Moved Permanently]

Done

I've also tried other OS 2 HTTP Client examples and these work with text web pages like this https://developer.mbed.org/media/uploads/donatien/hello.txt but not with html web pages. All very frustrating so any advice on the way forward would be appreciated.

Forgot to mention that I'm using the mbed LPC1768 and application board.

posted by Peter Ampt 21 Dec 2016

1 Answer

8 years ago.

Hello Peter, I'm in similar situation with a Nucleo STM32F746ZG. With HTML pages I got error 400. I'm trying to modify the HTTPClient Library https://developer.mbed.org/users/donatien/code/HTTPClient/ to work with mbed Socket.

If I'm suceed I will share the code. Best Regards.

Thanks Felícito, I tried the example which uses that HTTPClient library but it would only work with the text web page that I mentioned in my question. Anyway, hope you can get it to work.

posted by Peter Ampt 22 Dec 2016