• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Advice required with cURL, please!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Advice required with cURL, please!
      • From: Steve Mills <email@hidden>
  • Prev by Date: Raising the 'auto open zipped .dmg's' again.
  • Next by Date: Re: Advice required with cURL, please!
  • Previous by thread: Raising the 'auto open zipped .dmg's' again.
  • Next by thread: Re: Advice required with cURL, please!
  • Index(es):
    • Date
    • Thread