> For the complete documentation index, see [llms.txt](https://octoris.gitbook.io/octoris/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://octoris.gitbook.io/octoris/methods-api/connect.md).

# CONNECT

Handles building out CONNECT based routing

## Arguments

| Name       | Type     | Description                                             | Optional |
| ---------- | -------- | ------------------------------------------------------- | -------- |
| handler    | Function | The function to call to handle the route action         | No       |
| middleware | Array    | An array of middleware functions to use for this method | Yes      |

## Usage

```javascript
const { router, methods, response } = require('octoris')

function handler (ctx) {
  return response.send(200, 'OKAY!')
}

router.route(['/'], [methods.CONNECT(handler)])
```
