samedi 18 avril 2015

How to make AJAX post request with Certificate

I'm working on trying to access data from the Bloomberg API using javascript and AJAX from Pebble, and this is the example they show on their github



curl -X POST 'http://ift.tt/1G7bRng' \
--cacert bloomberg.crt \
--cert client.crt \
--key client.key \
--data @- <<EOF
{ "securities": ["IBM US Equity", "AAPL US Equity"],
"fields": ["PX_LAST", "OPEN"],
"startDate": "20120101",
"endDate": "20120105",
"periodicitySelection": "DAILY" }
EOF


I already have the certificates, I am just confused as to how to specify the certificates as args to the post request.


This is the documentation for what I am using. http://ift.tt/1G5Wjx2 Do I just specify these args under the headers option?


Aucun commentaire:

Enregistrer un commentaire