Replies: 1 comment 1 reply
-
Hi Currently, there is no significant way in which you could improve your setup with the app. It is not possible to make HTTP requests directly from Scripting. This instead requires that you invoke other shortcuts that then make the request, as you already do. There is a feature request for this here, but I'm currently not prioritizing this. The next best thing you could do is to hide your second and third shortcut by creating another category, moving them into it and then hiding the category. That way, you will not see them in the app anymore and can pretend that it's all just a single shortcut. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello I'm currently using UpSnap to wake on lan my devices when I'm away, using ZeroTier. I'm behind a 4G router so I've very few options to make WoL work when I'm not home.
I've been trying to set up things to do what's suggested in this github discussion and I have some questions to better understand HTTP-Shortcuts limits and capabilities.
In the first working test I set up five global variables (ServerIP, User, Password, HostID, Token) and three shortcuts:
curl -X POST -H "Content-Type: application/json" --data '{"identity": "{User}", "password": "{Password}"}' "http://{ServerIP}:8090/api/admins/auth-with-password"
and then stores the result to the Token global variablecurl -X GET -H "Authorization: Bearer {Token}" "http://{ServerIP}:8090/api/upsnap/wake/{HostID}"
and wakes up the target PC.All is working fine, but I'm wondering if there's a better way to optimize things. I'd love to compact everything in a single shortcut if it's technically possible. Are POST and GET commands (or will be) available from inside the scripting section ?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions