@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
24 lines (16 loc) • 848 B
Markdown
lang: en
title: 'API docs: rest.requestcontext.basepath'
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.requestcontext.basepath.html
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/rest](./rest.md) > [RequestContext](./rest.requestcontext.md) > [basePath](./rest.requestcontext.basepath.md)
## RequestContext.basePath property
Get the effective base path of the incoming request. This base path combines `baseUrl` provided by Express when LB4 handler is mounted on a non-root path, with the `basePath` value configured at LB4 side.
<b>Signature:</b>
```typescript
get basePath(): string;
```