O'Reilly logo

Internet of Things with Python by Gastón C. Hillar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Composing and sending HTTP requests

The HTTP server is running in Yocto Linux and waiting for our HTTP requests to control the LEDs on connected to the Intel Galileo Gen 2 board. Now, we will compose and send HTTP requests locally in Yocto Linux and then from other computer or devices connected to our LAN.

HTTPie supports curl-like shorthands for localhost. For example, :8888 is a shorthand that expands to http://localhost:8888. We already have an SSH terminal running the HTTP server, and therefore, we can run the following command in another SSH terminal.

http GET :8888/version

The previous command will compose and send the following HTTP request: GET http://localhost:8888/version. The request is the simplest case in our RESTful API because it ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required