I have a curl POST request in cli that looks like this:
curl -H "Authorization: Bearer TOKEN" \
https://app.asana.com/api/1.0/tasks \
--data-urlencode "assignee=IDNUMBER" \
--data-urlencode "notes=TASKNOTE" \
--data-urlencode "name=TASKNAME" \
--data-urlencode "workspace=WORKSPACEID" \
--data-urlencode "project=PROJECTID"
This POST works fine, and returns what I need.
However I want to have a similar script ran in applescript, via the 'do shell script' command. How would it look?
Actually it's the same syntax replacing the double quotes with single quotes and removing the backslash line separators
do shell script "curl -H 'Authorization: Bearer TOKEN' https://app.asana.com/api/1.0/tasks --data-urlencode 'assignee=IDNUMBER' --data-urlencode 'notes=TASKNOTE' --data-urlencode 'name=TASKNAME' --data-urlencode 'workspace=WORKSPACEID' --data-urlencode 'project=PROJECTID'"