Implementation of the Constrained Application Protocol (CoAP) client for node.js.
Implemented client-side features:
- draft-ietf-core-coap-18
- draft-ietf-core-block-12
- Block1 Block2 (server initiative)
- draft-ietf-core-observe-08
- Observe Block2 (server initiative)
- Re-registration after a Max-Age expiration
- Re-registration after a blockwise timeout
- See the test/functional/ directory for a list of tested scenarios.
npm install git://github.com/morkai/h5.coap git://github.com/morkai/h5.linkformat
var coap = require('h5.coap');
var linkformat = require('h5.linkformat');
var client = new coap.Client();
var req = client.get('coap://127.0.0.1/.well-known/core', {
accept: 'application/link-format'
});
req.on('response', function(res)
{
if (res.isSuccess())
{
console.log(linkformat.parse(res.getPayload().toString()));
}
else
{
console.log(res.toPrettyString());
}
});
- More tests
- Readme
- Documentation
- npm publish
This project is released under the MIT License.