Skip to content

Commit

Permalink
Fix ctx.request.params description (#1882)
Browse files Browse the repository at this point in the history
* fix: params

* Update docusaurus/docs/dev-docs/backend-customization/requests-responses.md

---------

Co-authored-by: Pierre Wizla <[email protected]>
  • Loading branch information
Boegie19 and pwizla authored Oct 16, 2023
1 parent d5c0951 commit 4a9bd03
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ The `ctx.request` object contains the following parameters:
| `ctx.request.ips` | When `X-Forwarded-For` is present and `app.proxy` is enabled, an array of IPs is returned, ordered from upstream to downstream. <br /><br />For example if the value were "client, proxy1, proxy2", you would receive the `["client", "proxy1", "proxy2"]` array. | `Array` |
| `ctx.request.method` | Request method (e.g., `GET`, `POST`). | `String` |
| `ctx.request.origin` | URL part before the first `/`. | `String` |
| `ctx.request.params` | Query parameters sent in the URL.<br /><br/>For example, if the request URL includes includes something like `/restaurants?id`, the `?id` part creates an `id` parameter accessible through `ctx.request.params.id`. | `Object` |
| `ctx.request.params` | Parameters sent in the URL.<br /><br/>For example, if the internal URL is `/restaurants/:id`, whatever you replace `:id` in the real request becomes accessible through `ctx.request.params.id`. | `Object` |
| `ctx.request.path` | Path of the requested resource, excluding the query parameters. | `String` |
| `ctx.request.protocol`| Protocol being used (e.g., `https` or `http`). | `String` |
| `ctx.request.query` | Strapi-specific [query parameters](#ctxrequestquery). | `Object` |
Expand Down

1 comment on commit 4a9bd03

@vercel
Copy link

@vercel vercel bot commented on 4a9bd03 Oct 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

documentation – ./

documentation-git-main-strapijs.vercel.app
documentation-strapijs.vercel.app
docs-vercel-v4.strapi.io

Please sign in to comment.