Zymba Documentation
REST.Client
Text
object @REST.Client(@Base) {
construct(string $url, ?function $callback_request, ?function $callback_response, int $timeout, bool $validate) {}
bind(string $route, string $method, object $headers): function {}
call(string $route, string $method, object $headers, ...$arguments): mixed {}
setLocation(string $url): $this {}
setTimeout(int $timeout): $this {}
setValidate(bool $validate): $this {}
}
RESTful client prototype.
Prototype
Methods
CODE
$this.construct(string $url, ?function $callback_request, ?function $callback_response, int $timeout, bool $validate): void
Parameters
| Name | Type | Value | Default |
|---|---|---|---|
| url | string | "" | |
| callback_request | ?function | pass through | |
| callback_response | ?function | universal handler | |
| timeout | int | 60 | |
| validate | bool | true |