Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Question:

Question: SSL Curl with Terminal vs Applescript

Hi folks,


I'm trying to access an HTTPS web site from Applescript. I'm hoping you can help:

- the website I want to access is: https://api.weather.gov/points/39.048,-774817

- I can get there with Applescript to Safari, but Safari automatically downloads the source and gives the downloaded file a weird name (difficult to work with). And, I don't want to go through Safari anyway

- I can get there with Terminal with the command: curl -k https://api.weather.gov/points/39.048,-774817

- the start of the correct result of the curl is:

{

"@context": [

- if I put this curl command in Applescript (do shell script "curl -k https://api.weather.gov/points/39.048,-774817"), I get:

"{

\"correlationId\": \"48422c52-0752-46d4-86de-a5cbf99bcedd\",

\"title\": \"Not Found\",

\"type\": \"https://api.weather.gov/problems/NotFound\",

\"status\": 404,

\"detail\": \"Not Found\",

\"instance\": \"https://api.weather.gov/requests/48422c52-0752-46d4-86de-a5cbf99bcedd\"

}"


Is this an SSL issue? I'd like to get this curl to work from Applescript... anyone know how to make this work?


Thanks

MacBook Pro (15-inch Early 2011)

Posted on

Reply
Question marked as Solved
Answer:
Answer:

It looks like a typo. You need a decimal point in your longitude value. And you can omit the "-k" part.

Posted on

Page content loaded

User profile for user: EngRMP

Question: SSL Curl with Terminal vs Applescript