@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
24 lines (16 loc) • 934 B
Markdown
lang: en
title: 'API docs: rest.requestcontext.requestedprotocol'
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.requestedprotocol.html
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/rest](./rest.md) > [RequestContext](./rest.requestcontext.md) > [requestedProtocol](./rest.requestcontext.requestedprotocol.md)
## RequestContext.requestedProtocol property
Get the protocol used by the client to make the request. Please note this protocol may be different from what we are observing at HTTP/TCP level, because reverse proxies like nginx or sidecars like Envoy are switching between protocols.
<b>Signature:</b>
```typescript
get requestedProtocol(): string;
```