HTTP Request (POST, PUT) action

nwaan

New member
I was able to pass http shortcut information back to macrodroid using the clipboard. Macrodroid lets you move the clipboard contents into a variable.

My knowledge of java is very limited, but this worked for me. In HTTP shortcut, edit the shortcut and open "scripting". This is the java script I used in HTTP shortcut to put data onto the clipboard.

Run on success and Run on failure:
const myBody = response.body;
copyToClipboard(myBody);

Screenshot_20210902-143633.png Screenshot_20210902-143618.png
 

sbstratos79

New member
I was able to pass http shortcut information back to macrodroid using the clipboard. Macrodroid lets you move the clipboard contents into a variable.

My knowledge of java is very limited, but this worked for me. In HTTP shortcut, edit the shortcut and open "scripting". This is the java script I used in HTTP shortcut to put data onto the clipboard.

Run on success and Run on failure:
const myBody = response.body;
copyToClipboard(myBody);

View attachment 919 View attachment 918
iirc, clipboard access had been after Android 10. You'll most probably need root to get this to work if you are on Android 10+.

The curl command method is much more reliable and easier. You get the response within macrodroid so no clipboard access needed.
 

Rajib311

New member
iirc, clipboard access had been after Android 10. You'll most probably need root to get this to work if you are on Android 10+.

The curl command method is much more reliable and easier. You get the response within macrodroid so no clipboard access needed.
How to use curl command? Please describe here..
 

sbstratos79

New member
Just google curl manual. You can also run curl -h on windows command prompt or Linux terminal to view help.
I should note that curl has not been working for me after I wiped my phone, recently.
 
Top