MCPcopy Index your code
hub / github.com/WebThingsIO/webthing-node / get

Method get

lib/server.ts:615–623  ·  view source on GitHub ↗

* Handle a GET request. * * @param {Object} req The request object * @param {Object} res The response object

(req: express.Request, res: express.Response)

Source from the content-addressed store, hash-verified

613 * @param {Object} res The response object
614 */
615 get(req: express.Request, res: express.Response): void {
616 const thing = this.getThing(req);
617 if (thing === null) {
618 res.status(404).end();
619 return;
620 }
621
622 res.json(thing.getEventDescriptions());
623 }
624}
625
626/**

Callers 1

constructorMethod · 0.95

Calls 2

getEventDescriptionsMethod · 0.80
getThingMethod · 0.45

Tested by

no test coverage detected