Question: If I have 

```
protocol AppearingTextContainer {
  func clipBounds() -> ()
}
extension AppearingTextContainer where Self: UIView {
  func clipBounds() { self.clipsToBounds = true }
}

```

then a class that adopts my protocol CustomView: AppearingTextContainer is not forced by the compiler to implement clipBounds. If I remove the extension it won't compile. Is there any way to enforce CustomView to call clipBounds without having to delete the default clipBounds implementation?

Thanks

Answer: 
`res.sendStatus` is shorthand for implementing `res.send` and `res.status`

the link shared by @freakish explains it all.

```
res.sendStatus(200); // equivalent to res.status(200).send('OK')
res.sendStatus(403); // equivalent to res.status(403).send('Forbidden')
res.sendStatus(404); // equivalent to res.status(404).send('Not Found')
res.sendStatus(500); // equivalent to res.status(500).send('Internal Server Error')

```
`sendStatus(code)` is a function that *duplicates* the standard status message corresponding to the provided status code *into the body*:

```js
app.get('/a', (req, res) => {
    res.sendStatus(500)
})

```

```http
HTTP/1.1 500 Internal Server Error     <--- this status message (aka "reason phrase")
<response headers>

Internal Server Error                  <--- gets duplicated here in body

```

[See here for its implementation](https://github.com/expressjs/express/blob/4.18.1/lib/response.js#L369). There is no obvious need to do that, because the status message (the text after "`500` ") will be there regardless. The above is NOT a normal HTTP idiom. Who knows why it was added into the express response. Moreover, when you send a non-empty body along with a status to a browser, it will render that body rather than a standard stylish page:

[![Internal Server Error](https://i.stack.imgur.com/8Of2v.png)](https://i.stack.imgur.com/8Of2v.png)

---

`res.status(500).send()` is sufficient to respond in a standard way:

```js
app.get('/b', (req, res) => {
    res.status(500).send()
})

```

```http
HTTP/1.1 500 Internal Server Error     <--- status message
<response headers>
                                       <--- empty body

```

[![This page isn't working. 127.0.0.1 is currently unable to handle this request. HTTP ERROR 500](https://i.stack.imgur.com/UBNe7.png)](https://i.stack.imgur.com/UBNe7.png)

This is what everyone expects if there is nothing to say beyond status code & message.