Open jimrothstein opened 2 years ago
Hi Josiah: Giving a talk about api and wanted to demonstrate opensecrets. Using cURL, not R.
My key is good and if I place this in browser it works. https://www.opensecrets.org/api/?method=getLegislators&id=NJ&apikey=
However, I get an error 1020 or no matches if with curl curl http://www.opensecrets.org/api/?method=getLegislators&id=NJ&apikey=
Have tried urlencoding the query, varioius combinations of -L, --location-trusted, but just can NOT get it to work.
You see anything obviously wrong?
curl -V curl 7.58.0 (x86_64-pc-linux-gnu) libcurl/7.58.0 OpenSSL/1.1.1 zlib/1.2.11 libidn2/2.0.4 libpsl/0 .19.1 (+libidn2/2.0.4) nghttp2/1.30.0 librtmp/2.3 Release-Date: 2018-01-24 Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smb sm bs smtp smtps telnet tftp Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP HTTP 2 UnixSockets HTTPS-proxy PSL
Hi Josiah: Giving a talk about api and wanted to demonstrate opensecrets. Using cURL, not R.
My key is good and if I place this in browser it works. https://www.opensecrets.org/api/?method=getLegislators&id=NJ&apikey=
However, I get an error 1020 or no matches if with curl curl http://www.opensecrets.org/api/?method=getLegislators&id=NJ&apikey=
Have tried urlencoding the query, varioius combinations of -L, --location-trusted, but just can NOT get it to work.
You see anything obviously wrong?
curl -V curl 7.58.0 (x86_64-pc-linux-gnu) libcurl/7.58.0 OpenSSL/1.1.1 zlib/1.2.11 libidn2/2.0.4 libpsl/0 .19.1 (+libidn2/2.0.4) nghttp2/1.30.0 librtmp/2.3 Release-Date: 2018-01-24 Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smb sm bs smtp smtps telnet tftp Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP HTTP 2 UnixSockets HTTPS-proxy PSL