sails
Version:
API-driven framework for building realtime apps, using MVC conventions (based on Express and Socket.io)
34 lines (17 loc) • 617 B
Markdown
# `req.host`
> ##### **This method is deprecated and will likely be removed or changed in an upcoming release.**
> Instead, use [req.hostname](https://sailsjs.com/documentation/reference/request-req/req-hostname).
The hostname of this request, without the port number, as specified by its "Host" header.
### Usage
```usage
req.host;
```
### Example
If this request's "Host" header was "ww3.staging.ibm.com:1492":
```javascript
req.host;
// -> "ww3.staging.ibm.com"
```
<docmeta name="displayName" value="req.host">
<docmeta name="pageType" value="property">
<docmeta name="isDeprecated" value="true">