我正试图让stormpath使用curl。
curl -X POST --user $YOUR_API_KEY_ID:$YOUR_API_KEY_SECRET \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"givenName": "Jean-Luc",
"surname": "Picard",
"username": "jlpicard",
"email": "capt@enterprise.com",
"password":"Changeme1"
}' \ "https://api.stormpath.com/v1/applications/$YOUR_APPLICATION_ID/accounts"
当我尝试这个时,我收到了消息:
curl: (1) Protocol https not supported or disabled in libcurl
要查看curl支持的内容,我运行了curl -V:
curl 7.30.0 (x86_64-apple-darwin13.0) libcurl/7.30.0 SecureTransport zlib/1.2.5
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smtp smtps telnet tftp
Features: AsynchDNS GSS-Negotiate IPv6 Largefile NTLM NTLM_WB SSL libz
如您所见,https是受支持的协议。任何帮助表示赞赏。
谢谢,
安德鲁
答案 0 :(得分:0)
我找到了。在最后一行,我有一个用于行继续的反斜杠,我继续在同一行:
}' \ "https://api.stormpath.com/v1/applications/$YOUR_APPLICATION_ID/accounts"
一旦我拿出反斜杠就行了! :)
}' "https://api.stormpath.com/v1/applications/$YOUR_APPLICATION_ID/accounts"
希望能有所帮助。
安德鲁