Skip to content

Commit f68ad7e

Browse files
committed
feat: add trace and connect http request methods
1 parent 0ce204a commit f68ad7e

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/Router/AbstractRouter.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,18 @@ public function options(string $path, callable|string|array $handler): void
9696
$this->map(['OPTIONS'], $path, $handler);
9797
}
9898

99+
public function trace(string $path, callable|string|array $handler): void
100+
{
101+
$this->map(['TRACE'], $path, $handler);
102+
}
103+
104+
public function connect(string $path, callable|string|array $handler): void
105+
{
106+
$this->map(['CONNECT'], $path, $handler);
107+
}
108+
99109
public function any(string $path, callable|string|array $handler): void
100110
{
101-
$this->map(['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS'], $path, $handler);
111+
$this->map(['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS', 'TRACE', 'CONNECT'], $path, $handler);
102112
}
103113
}

0 commit comments

Comments
 (0)