UNPKG

@loopback/docs

Version:

Documentation files rendered at [https://loopback.io](https://loopback.io)

67 lines (35 loc) 1.1 kB
--- lang: en title: 'API docs: rest.restrouter.find' keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI sidebar: lb4_sidebar editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/rest permalink: /doc/en/lb4/apidocs.rest.restrouter.find.html --- <!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@loopback/rest](./rest.md) &gt; [RestRouter](./rest.restrouter.md) &gt; [find](./rest.restrouter.find.md) ## RestRouter.find() method Find a matching route for the given http request **Signature:** ```typescript find(request: Request): ResolvedRoute | undefined; ``` ## Parameters <table><thead><tr><th> Parameter </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td markdown="1"> request </td><td markdown="1"> Request </td><td markdown="1"> Http request </td></tr> </tbody></table> **Returns:** [ResolvedRoute](./rest.resolvedroute.md) \| undefined The resolved route, if not found, `undefined` is returned