Problem: for my bachelor thesis I developed a simple Java RESTful Web Service that could be used to control a mBot robot car using the internet. For this I used a Raspberry Pi to run the web service. The Raspberry Pi was connected via USB to the mBot. The embedded mBot controls (e.g. to move forwards/backwards, spin, retreive sensor informations) were called via the internet using HTTP endpoints. Before implementing some sort of UI to map these controls to a user-friendly interface (which I later implemented as a JavaFX project) I needed to test the endpoints to see if my web service works and if the commands I implemented actually do what they are supposed to.
Solution: use curl and its command line on my Windows laptop to send HTTP requests to a given URL (which is the HTTP endpoint that controls the mBot). From their webpage: curl is a tool to transfer data from or to a server, using one of the supported protocols (in my case HTTP).
Comments