I am using restclient-mode and trying to POST JSON to an API I'm writing. Making curl requests works fine but I'm getting these errors from restclient.el:

My restclient-mode request looks like this:

POST https://www.example.com/
Content-Type: application/json

  "email": "[email protected]",
  "password": "secretP@55word"

I see this output in the Messages buffer:

Contacting host: **API URL**:443
Opening TLS connection to `**API URL**'...
Opening TLS connection with `gnutls-cli --insecure -p 443 **API URL**'...failed
Opening TLS connection with `gnutls-cli --insecure -p 443 **API URL** --protocols ssl3'...failed
Opening TLS connection with `openssl s_client -connect **API URL**:443 -no_ssl2 -ign_eof'...failed
Opening TLS connection to `**API URL**'...failed
url-http: Could not create connection to **API URL**:443

My gnutls-cli info:

$ /usr/local/bin/gnutls-cli --version
gnutls-cli 3.3.9
  • Just made a successful request, same url, same datas. I'm using gnutls-cli (GnuTLS) 2.12.20 Packaged by Debian (2.12.20-8+deb7u3)
    – Nsukami _
    Commented Apr 13, 2015 at 23:38
  • @Nsukami_ it works for me too in other scenarios. I just don't know how to proceed further or get better debug information.
    – bitops
    Commented Apr 14, 2015 at 0:21
  • So, can we know more about your environment/setup? Do you have a proxy? Do you wear google glasses when the error occurs? etc ...
    – Nsukami _
    Commented Apr 14, 2015 at 0:33
  • @Nsukami_ I use a pretty vanilla Emacs install. Nothing special. Emacs 24.4, OS X, installed from Emacs for Mac OSX. No proxy and I'm able to post to other sites just fine.
    – bitops
    Commented Apr 14, 2015 at 20:43


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.