Q: How to retrieve a list of Github gists using url-retrieve-synchronously
?
I am able to visit my gist list in a web browser:
https://api.github.com/users/lawlist/gists
When I try evaluating:
(url-retrieve-synchronously "https://api.github.com/users/lawlist/gists")
I get this:
Debugger entered--Lisp error: (error "Could not create connection to api.github.com:443")
signal(error ("Could not create connection to api.github.com:443"))
error("Could not create connection to %s:%d" "api.github.com" 443)
url-http(#s(url :type "https" :user nil :password nil :host "api.github.com" :portspec nil :filename "/users/lawlist/gists" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous nil) #f(compiled-function (&rest ignored) #<bytecode 0x40e4195f>) (nil) nil tls)
url-https(#s(url :type "https" :user nil :password nil :host "api.github.com" :portspec nil :filename "/users/lawlist/gists" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous nil) #f(compiled-function (&rest ignored) #<bytecode 0x40e4195f>) (nil))
url-retrieve-internal("https://api.github.com/users/lawlist/gists" #f(compiled-function (&rest ignored) #<bytecode 0x40e4195f>) (nil) nil nil)
url-retrieve("https://api.github.com/users/lawlist/gists" #f(compiled-function (&rest ignored) #<bytecode 0x40e4195f>) nil nil nil)
url-retrieve-synchronously("https://api.github.com/users/lawlist/gists")
eval((url-retrieve-synchronously "https://api.github.com/users/lawlist/gists") nil)
eval-expression((url-retrieve-synchronously "https://api.github.com/users/lawlist/gists") nil nil 127)
funcall-interactively(eval-expression (url-retrieve-synchronously "https://api.github.com/users/lawlist/gists") nil nil 127)
call-interactively(eval-expression nil nil)
command-execute(eval-expression)
Emacs Version: This is GNU Emacs 26.1 (build 1, x86_64-apple-darwin10.8.0, NS appkit-1038.36 Version 10.6.8 (Build 10K549)) of 2018-05-30
I have tried adding a username/password, but the result was similar:
(url-retrieve-synchronously "https://USERNAME:[email protected]/users/lawlist/gists")
[{"url":"https://api.github.com/gists/303d3000eeb25d4885963ba5514e57d9","forks_url":"https://api.github.com/gists/303d3000eeb25d4885963ba5514e57d9/forks","...
url-retrieve-synchronously
to work on your end. After firing up a newer computer, I was also able to get a desired output. I answered this question with data regarding what version ofOpenSSL
was used to obtain the desired result. It sure would have been nice if Emacs could check the version and indicate what the problem was ..., but that may be asking for too much from Emacs ...