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

Method get

lib/server.ts:341–349  ·  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

339 * @param {Object} res The response object
340 */
341 get(req: express.Request, res: express.Response): void {
342 const thing = this.getThing(req);
343 if (thing === null) {
344 res.status(404).end();
345 return;
346 }
347
348 res.json(thing.getProperties());
349 }
350}
351
352/**

Callers 1

constructorMethod · 0.95

Calls 2

getPropertiesMethod · 0.80
getThingMethod · 0.45

Tested by

no test coverage detected