From a93c97b1d21d96ef46df5a360dafa15291643811 Mon Sep 17 00:00:00 2001 From: Lynh Date: Wed, 24 Feb 2021 00:51:21 +0700 Subject: [PATCH] Update readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b8b6f11..9a40f11 100644 --- a/README.md +++ b/README.md @@ -197,7 +197,7 @@ public function boot() } ``` -Hades will add the header `Accept: application/json` to all incoming API requests. If you want to use custom MIME type, you may use the `withMimeType` to specify the MIME type: +Hades will add the header `Accept: application/json` to all [incoming API requests](#identify-api-requests). If you want to use custom MIME type, you may use the `withMimeType` to specify the MIME type: ```php Hades::forceJsonOutput() @@ -208,7 +208,7 @@ Hades::forceJsonOutput() In order to force the response to return JSON output, Hades needs to identify the incoming request so it doesn't add the `Accept` header on your normal HTML pages. -By default, all your API routes defined in `routes/api.php` have `/api` URI prefix automatically applied. Hades will inspects the incoming request URI and determines if the API request URI has the `/api` prefix. +By default, all your API routes defined in `routes/api.php` have `/api` URI prefix automatically applied. Hades will inspects the incoming request URI and determines it's URI matches the `/api` prefix. To customize this behavior, you may pass the closure to `Hades::forceJsonOutput()` to instruct Hades how to identify the incoming request: