Skip to content

Commit 7e50db4

Browse files
committed
feat: add custom response documentation
1 parent 0ff05cf commit 7e50db4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/docs/http/response.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ $app->response()->xml('<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
260260

261261
### Custom responses
262262

263-
If you need to create a custom response, which is not covered by the methods above, you can use the `custom()` method. This method accepts 2 parameters:
263+
If you need to create a custom response, which is not covered by the methods above, you can use the `echo()` method. This method accepts 2 parameters:
264264

265265
- the content to output
266266
- an optional status code (defaults to 200/OK)
@@ -274,7 +274,7 @@ response()
274274
'Content-Length' => $dataLength,
275275
'Content-Disposition' => "inline; filename=\"$filename\""
276276
])
277-
->custom($rawData);
277+
->echo($rawData);
278278
```
279279

280280
```php:no-line-numbers [Leaf Instance]
@@ -285,7 +285,7 @@ $app
285285
'Content-Length' => $dataLength,
286286
'Content-Disposition' => "inline; filename=\"$filename\""
287287
])
288-
->custom($rawData);
288+
->echo($rawData);
289289
```
290290

291291
:::

0 commit comments

Comments
 (0)