Advice required with cURL, please!
Advice required with cURL, please!
- Subject: Advice required with cURL, please!
- From: Brian Christmas <email@hidden>
- Date: Mon, 23 Oct 2017 12:53:06 +1100
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?
Regards
Santa
property EmailAddress : "email@hidden"
property businessName : “xxxxxxxxxxxxxxxxx.com"
set theCheckPath to "http://xxxxxxxxxx.com/xxxx xxxx/Used Email.txt/"
try
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
theEmailList
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden