Can HA process external web commands when an event is triggered?

Could I have used the - platform: command_line
as seen in this thread?

  - platform: command_line
    command: curl -i http://192.168.0.1