I make a POST request to the Mongoose cloud like this.
HTTP.query({
url: 'https://mdash.net/api/v2/devices/device2?access_token=xxxxxxxxxxx',
headers: { 'Content-Type': 'application/json' },
data: mdata, // { shadow: { state: { desired: { built_in: boolean}}}}
cert: 'cert.pem', // client certificate // just left it if you dont have this file
key: 'key.pem', // client key //just left if you dont has this file
ca_cert: 'ca.pem', // ca bundle to verify server with ""
success: function (body, full_http_msg) { print("body"); },
error: function (err) { print(err); }
});
“ca.pem” is from https://github.com/mongoose-os-libs/ca-bundle/blob/master/fs/ca.pem