@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
26 lines (17 loc) • 1.02 kB
Markdown
lang: en
title: 'API docs: rest.requestcontext.requestedbaseurl'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/strongloop/loopback-next/tree/master/packages/rest
permalink: /doc/en/lb4/apidocs.rest.requestcontext.requestedbaseurl.html
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/rest](./rest.md) > [RequestContext](./rest.requestcontext.md) > [requestedBaseUrl](./rest.requestcontext.requestedbaseurl.md)
## RequestContext.requestedBaseUrl property
Get the base URL used by the client to make the request. This URL contains the protocol, hostname, port and base path. The path of the invoked route and query string is not included.
Please note these values may be different from what we are observing at HTTP/TCP level, because reverse proxies like nginx are rewriting them.
<b>Signature:</b>
```typescript
get requestedBaseUrl(): string;
```