Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

REST API - using nodejs request authentication #1834

whgibbo ·
Hi,
Does anybody have an example of how to use the REST APIs using the nodejs request. I have tried using basic authentication, but it didn't seem to work, any ideas?
Or will I have to result to use curl <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( -->

Thanks
  • replies 5
  • views 2787
  • stars 0
robinshen ADMIN ·
QB restful API uses standard http basic authentication otherwise, it will not be able to work with curl. I am never used node.js so can not help much here...
whgibbo ·
Thanks for the reply..

I'm trying the use curl as outlined in the APIs, but we are using https rather than http, are there any examples ?

I have tried the following :

curl --basic --user username:password -url https://buildServer:8899/rest/latest_builds/75 --cafile cacert.pem -k --sslv3


Am I doing something wrong ?
robinshen ADMIN ·
This works at my side:
curl -u username:password https://buildServer:8899/rest/latest_builds/75 -k

I am using curl 7.20.1
whgibbo ·
Thanks I tried that but get the following error:

curl: (35) error:14077438:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert internal error


I'm using curl 7.21.6 (x86_64-pc-linux-gnu) on ubuntu 11.10
robinshen ADMIN ·
This seems like a bug. Refer here for details:
https://bugs.launchpad.net/ubuntu/+sour ... bug/861137