Shell command / do GET request in automation or script

Hey folks - I’m migrating from Homeseer where I have some events that make RESTful GET calls to trigger some arduino devices I built myself. Wondering how to make similar GET calls in HA scripts/automations. I did some internet searching and found shell commands, but I’m new to HA and most YT videos don’t give a baseline on understanding the YAML for shell commands and how to make it run a curl. Any advice?

does this do what you want?

As already mentioned, you should look at the REST command integration, but there are some edge cases that can’t be handled through that, so here’s an example of using curl with the shell command integration:

shell_command:
  tmobile_reboot: "curl -s --data-binary @/config/shellscripts/tmobile-reboot.js -H 'Content-Type: application/javascript' http://localhost:3003/function > /config/www/tmobile-reboot-image.png"

In this case, I needed to POST the contents of a file as binary data (i.e. not URL encoded), and I needed to save the image that is returned somewhere I can view it via a dashboard. As I mentioned, these are some unusual/edge use cases and the REST integration is surely what you need. I’m just sharing this example since you asked specifically about calling curl through a shell command.