Advice required with cURL, please!

Brian Christmas

G’day scripters

I want to read a remote .txt file using cURL, and save the result to a variable, NOT a file.

If necessary, I want to add to that variable, and write it back to the remote file.

Just can’t get it right. Plenty of advice online on saving or transferring a FILE, but things get awkward when limited to a variable. Simply can’t find info!

The following doesn’t error, but also doesn’t save.

Can someone tell me how to go about the right cURL method, please?



property EmailAddress : "ozsanta@..."
property businessName : “"



say 0
do shell script " curl  file_get_contents " & theCheckPath & " echo " & theEmailList
on error
say 0.1
set theEmailList to {}
end try
if (count of theEmailList) = 0 then set theEmailList to {}
say 1
set end of theEmailList to {{EmailAddress}, {businessName}}
say 2
do shell script "curl -T -d " & theEmailList & " --url " & theCheckPath


Join to automatically receive all group messages.