---
title: "REST.Server"
description: "RESTful server prototype."
canonical_url: "https://www.zeyos.com/zymba/ref/rest/rest-server"
markdown_url: "https://www.zeyos.com/ai/guide/zymba/ref/rest/rest-server.md"
section: "zymba-reference"
authority: "reference"
language: "en"
source_repository: "https://cloud.zeyos.com/__doc/zymbaref.json"
source_sha256: "05a361c6ddc32e74f4a6dc16fd06f218210ff1b7ce57f26ca1994bfffc407915"
---

# REST.Server

## REST.Server

```
object @REST.Server(@Base) {
	construct() {}
	bind(function $callback, string $route, string $method): $this {}
	bindMethods(...$routes): $this {}
	handle(): mixed {}
}
```

**RESTful server prototype.**

### Prototype

**[Base](#)**

## Methods


### `$this.construct()`


```code
$this.construct(): void
```




### `$this.bind()`


```code
$this.bind(function $callback, string $route, string $method): this
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| callback | `function`  |  | null |
| route | `string`  |  | "" |
| method | `string`  |  | "GET" |

##### Returns

| Type | Value |
| --- | ---  |
| `$this` |  |




### `$this.bindMethods()`


```code
$this.bindMethods(variadic $routes): this
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| routes | `variadic`  |  | ... |

##### Returns

| Type | Value |
| --- | ---  |
| `$this` |  |




### `$this.handle()`


```code
$this.handle(): mixed
```

##### Returns

| Type | Value |
| --- | ---  |
| `mixed` |  |
