Re: Tearing my bloody hair out.
Re: Tearing my bloody hair out.
- Subject: Re: Tearing my bloody hair out.
- From: Jim Skibbie <email@hidden>
- Date: Fri, 15 Sep 2017 20:51:51 +0000
- Thread-topic: Tearing my bloody hair out.
I would suggest opening up Terminal and trying this from the command line
using curl’s --verbose flag until you can verify your request is working
correctly.
curl --verbose -A UserAgentString -u
2V57JR9HQNAZNZVOW6OZXG:F7l-9f3SR2We7q9L6mzds
https://api.fastspring.com/subscriptions?page=1&limit=1
When I do this, I get the below result. Note that the response is “401
Unauthorized”. I’m assuming you didn’t publish your real username and
password above.
Once you get it working, you can just wrap the command inside the do shell
script command.
* Trying 54.88.60.171...
* Connected to api.fastspring.com (54.88.60.171) port 443 (#0)
* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
* Server certificate: *.fastspring.com
* Server certificate: Amazon
* Server certificate: Amazon Root CA 1
* Server certificate: Starfield Services Root Certificate Authority - G2
* Server auth using Basic with user '2V57JR9HQNAZNZVOW6OZXG'
> GET /subscriptions?page=1 HTTP/1.1
> Host: api.fastspring.com
> Authorization: Basic
>MlY1N0pSOUhRTkFaTlpWT1c2T1pYRzpGN2wtOWYzU1IyV2U3cTlMNm16ZHM=
> User-Agent: UserAgentString
> Accept: */*
>
< HTTP/1.1 401 Unauthorized
< Date: Fri, 15 Sep 2017 20:45:42 GMT
< Server: nginx
< Content-Length: 0
< Connection: keep-alive
>Date: Fri, 15 Sep 2017 15:51:58 +1000
>From: Brian Christmas <email@hidden>
>To: Applescript Xcode new list <email@hidden>,
> Applescript Users <email@hidden>
>Subject: Re: Tearing my bloody hair out.
>Message-ID: <email@hidden>
>Content-Type: text/plain; charset="utf-8"
>
>
>
>
>G’day again scripters
>
>I’ve been trying to study Curl for days, and now how to use Curl in a ‘do
>shell script’.
>
>I can’t for the life of me see why this won’t work? BUT, I’m really a
>novice at using CURL, completely new to me.
>
>Fast Springs site says I have to use GET. This handler returns “"
>
>Santa
>
>set jsonURL to do shell script "curl -H -u
>'2V57JR9HQNAZNZVOW6OZXG:F7l-9f3SR2We7q9L6mzds' -G
>\"https://api.fastspring.com/subscriptions?limit=10000\”"
>
_______________________________________________
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