coap-api
v1.1.9
Published
Coap API Wrapper
Downloads
8
Readme
Coap API
Installation
npm install coap-api --save
Usage
discover
var coapApi = require("coap-api");
coapApi.discover(host)
.then(discovered => {...})
.catch(err => {...});
GET
var coapApi = require("coap-api");
coapApi.GET(host,resourceEndpoint,getQueryString)
.then(response => {...})
.catch(error => {...});
POST
var coapApi = require("coap-api");
coapApi.POST(host,resourceEndpoint,getQueryString,postPayloadString)
.then(response => {...})
.catch(error => {...});
PUT
var coapApi = require("coap-api");
coapApi.PUT(host,resourceEndpoint,getQueryString,postPayloadString)
.then(response => {...})
.catch(error => {...});
DELETE
var coapApi = require("coap-api");
coapApi.DELETE(host,resourceEndpoint)
.then(response => {...})
.catch(error => {...});
observe
var coapApi = require("coap-api");
coapApi.observe(host,resourceEndpoint,getQueryString,(response) => {...})