Skip to content

Commit bd87eda

Browse files
committed
minor docs change
1 parent 21fbaec commit bd87eda

File tree

3 files changed

+3
-3
lines changed
  • packages

3 files changed

+3
-3
lines changed

packages/docs/src/routes/api/qwik-city-middleware-request-handler/api.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@
313313
}
314314
],
315315
"kind": "Interface",
316-
"content": "```typescript\nexport interface RequestEventBase<PLATFORM = QwikCityPlatform> \n```\n\n\n<table><thead><tr><th>\n\nProperty\n\n\n</th><th>\n\nModifiers\n\n\n</th><th>\n\nType\n\n\n</th><th>\n\nDescription\n\n\n</th></tr></thead>\n<tbody><tr><td>\n\n[basePathname](#)\n\n\n</td><td>\n\n`readonly`\n\n\n</td><td>\n\nstring\n\n\n</td><td>\n\nThe base pathname of the request, which can be configured at build time. Defaults to `/`<!-- -->.\n\n\n</td></tr>\n<tr><td>\n\n[cacheControl](#)\n\n\n</td><td>\n\n`readonly`\n\n\n</td><td>\n\n(cacheControl: [CacheControl](#cachecontrol)<!-- -->, target?: CacheControlTarget) =&gt; void\n\n\n</td><td>\n\nConvenience method to set the Cache-Control header. Depending on your CDN, you may want to add another cacheControl with the second argument set to `CDN-Cache-Control` or any other value (we provide the most common values for auto-complete, but you can use any string you want).\n\nSee https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control and https://qwik.dev/docs/caching/\\#CDN-Cache-Controls for more information.\n\n\n</td></tr>\n<tr><td>\n\n[clientConn](#)\n\n\n</td><td>\n\n`readonly`\n\n\n</td><td>\n\n[ClientConn](#clientconn)\n\n\n</td><td>\n\nProvides information about the client connection, such as the IP address and the country the request originated from.\n\n\n</td></tr>\n<tr><td>\n\n[cookie](#)\n\n\n</td><td>\n\n`readonly`\n\n\n</td><td>\n\n[Cookie](#cookie)\n\n\n</td><td>\n\nHTTP request and response cookie. Use the `get()` method to retrieve a request cookie value. Use the `set()` method to set a response cookie value.\n\nhttps://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies\n\n\n</td></tr>\n<tr><td>\n\n[env](#)\n\n\n</td><td>\n\n`readonly`\n\n\n</td><td>\n\n[EnvGetter](#envgetter)\n\n\n</td><td>\n\nPlatform provided environment variables.\n\n\n</td></tr>\n<tr><td>\n\n[headers](#)\n\n\n</td><td>\n\n`readonly`\n\n\n</td><td>\n\nHeaders\n\n\n</td><td>\n\nHTTP response headers. Notice it will be empty until you first add a header. If you want to read the request headers, use `request.headers` instead.\n\nhttps://developer.mozilla.org/en-US/docs/Glossary/Response\\_header\n\n\n</td></tr>\n<tr><td>\n\n[method](#)\n\n\n</td><td>\n\n`readonly`\n\n\n</td><td>\n\nstring\n\n\n</td><td>\n\nHTTP request method.\n\nhttps://developer.mozilla.org/en-US/docs/Web/HTTP/Methods\n\n\n</td></tr>\n<tr><td>\n\n[originalUrl](#)\n\n\n</td><td>\n\n`readonly`\n\n\n</td><td>\n\nURL\n\n\n</td><td>\n\nHTTP request Canonical URL.\n\nThis property was introduced to support the rewrite feature.\n\nIf rewrite is called, the url property will be changed to the rewritten url. while originalUrl will stay the same(e.g the url inserted to the address bar).\n\nIf rewrite is never called as part of the request, the url property and the originalUrl are equal.\n\n\n</td></tr>\n<tr><td>\n\n[params](#)\n\n\n</td><td>\n\n`readonly`\n\n\n</td><td>\n\nReadonly&lt;Record&lt;string, string&gt;&gt;\n\n\n</td><td>\n\nURL path params which have been parsed from the current url pathname segments. Use `query` to instead retrieve the query string search params.\n\n\n</td></tr>\n<tr><td>\n\n[parseBody](#)\n\n\n</td><td>\n\n`readonly`\n\n\n</td><td>\n\n() =&gt; Promise&lt;unknown&gt;\n\n\n</td><td>\n\nThis method will check the request headers for a `Content-Type` header and parse the body accordingly. It supports `application/json`<!-- -->, `application/x-www-form-urlencoded`<!-- -->, and `multipart/form-data` content types.\n\nIf the `Content-Type` header is not set, it will return `null`<!-- -->.\n\n\n</td></tr>\n<tr><td>\n\n[pathname](#)\n\n\n</td><td>\n\n`readonly`\n\n\n</td><td>\n\nstring\n\n\n</td><td>\n\nURL pathname. Does not include the protocol, domain, query string (search params) or hash.\n\nhttps://developer.mozilla.org/en-US/docs/Web/API/URL/pathname\n\n\n</td></tr>\n<tr><td>\n\n[platform](#)\n\n\n</td><td>\n\n`readonly`\n\n\n</td><td>\n\nPLATFORM\n\n\n</td><td>\n\nPlatform specific data and functions\n\n\n</td></tr>\n<tr><td>\n\n[query](#)\n\n\n</td><td>\n\n`readonly`\n\n\n</td><td>\n\nURLSearchParams\n\n\n</td><td>\n\nURL Query Strings (URL Search Params). Use `params` to instead retrieve the route params found in the url pathname.\n\nhttps://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams\n\n\n</td></tr>\n<tr><td>\n\n[request](#)\n\n\n</td><td>\n\n`readonly`\n\n\n</td><td>\n\nRequest\n\n\n</td><td>\n\nHTTP request information.\n\n\n</td></tr>\n<tr><td>\n\n[sharedMap](#)\n\n\n</td><td>\n\n`readonly`\n\n\n</td><td>\n\nMap&lt;string, any&gt;\n\n\n</td><td>\n\nShared Map across all the request handlers. Every HTTP request will get a new instance of the shared map. The shared map is useful for sharing data between request handlers.\n\n\n</td></tr>\n<tr><td>\n\n[signal](#)\n\n\n</td><td>\n\n`readonly`\n\n\n</td><td>\n\nAbortSignal\n\n\n</td><td>\n\nRequest's AbortSignal (same as `request.signal`<!-- -->). This signal indicates that the request has been aborted.\n\n\n</td></tr>\n<tr><td>\n\n[url](#)\n\n\n</td><td>\n\n`readonly`\n\n\n</td><td>\n\nURL\n\n\n</td><td>\n\nHTTP request URL.\n\n\n</td></tr>\n</tbody></table>",
316+
"content": "```typescript\nexport interface RequestEventBase<PLATFORM = QwikCityPlatform> \n```\n\n\n<table><thead><tr><th>\n\nProperty\n\n\n</th><th>\n\nModifiers\n\n\n</th><th>\n\nType\n\n\n</th><th>\n\nDescription\n\n\n</th></tr></thead>\n<tbody><tr><td>\n\n[basePathname](#)\n\n\n</td><td>\n\n`readonly`\n\n\n</td><td>\n\nstring\n\n\n</td><td>\n\nThe base pathname of the request, which can be configured at build time. Defaults to `/`<!-- -->.\n\n\n</td></tr>\n<tr><td>\n\n[cacheControl](#)\n\n\n</td><td>\n\n`readonly`\n\n\n</td><td>\n\n(cacheControl: [CacheControl](#cachecontrol)<!-- -->, target?: CacheControlTarget) =&gt; void\n\n\n</td><td>\n\nConvenience method to set the Cache-Control header. Depending on your CDN, you may want to add another cacheControl with the second argument set to `CDN-Cache-Control` or any other value (we provide the most common values for auto-complete, but you can use any string you want).\n\nSee https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control and https://qwik.dev/docs/caching/\\#CDN-Cache-Controls for more information.\n\n\n</td></tr>\n<tr><td>\n\n[clientConn](#)\n\n\n</td><td>\n\n`readonly`\n\n\n</td><td>\n\n[ClientConn](#clientconn)\n\n\n</td><td>\n\nProvides information about the client connection, such as the IP address and the country the request originated from.\n\n\n</td></tr>\n<tr><td>\n\n[cookie](#)\n\n\n</td><td>\n\n`readonly`\n\n\n</td><td>\n\n[Cookie](#cookie)\n\n\n</td><td>\n\nHTTP request and response cookie. Use the `get()` method to retrieve a request cookie value. Use the `set()` method to set a response cookie value.\n\nhttps://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies\n\n\n</td></tr>\n<tr><td>\n\n[env](#)\n\n\n</td><td>\n\n`readonly`\n\n\n</td><td>\n\n[EnvGetter](#envgetter)\n\n\n</td><td>\n\nPlatform provided environment variables.\n\n\n</td></tr>\n<tr><td>\n\n[headers](#)\n\n\n</td><td>\n\n`readonly`\n\n\n</td><td>\n\nHeaders\n\n\n</td><td>\n\nHTTP response headers. Notice it will be empty until you first add a header. If you want to read the request headers, use `request.headers` instead.\n\nhttps://developer.mozilla.org/en-US/docs/Glossary/Response\\_header\n\n\n</td></tr>\n<tr><td>\n\n[method](#)\n\n\n</td><td>\n\n`readonly`\n\n\n</td><td>\n\nstring\n\n\n</td><td>\n\nHTTP request method.\n\nhttps://developer.mozilla.org/en-US/docs/Web/HTTP/Methods\n\n\n</td></tr>\n<tr><td>\n\n[originalUrl](#)\n\n\n</td><td>\n\n`readonly`\n\n\n</td><td>\n\nURL\n\n\n</td><td>\n\nThe original HTTP request URL.\n\nThis property was introduced to support the rewrite feature.\n\nIf rewrite is called, the url property will be changed to the rewritten url. while originalUrl will stay the same(e.g the url inserted to the address bar).\n\nIf rewrite is never called as part of the request, the url property and the originalUrl are equal.\n\n\n</td></tr>\n<tr><td>\n\n[params](#)\n\n\n</td><td>\n\n`readonly`\n\n\n</td><td>\n\nReadonly&lt;Record&lt;string, string&gt;&gt;\n\n\n</td><td>\n\nURL path params which have been parsed from the current url pathname segments. Use `query` to instead retrieve the query string search params.\n\n\n</td></tr>\n<tr><td>\n\n[parseBody](#)\n\n\n</td><td>\n\n`readonly`\n\n\n</td><td>\n\n() =&gt; Promise&lt;unknown&gt;\n\n\n</td><td>\n\nThis method will check the request headers for a `Content-Type` header and parse the body accordingly. It supports `application/json`<!-- -->, `application/x-www-form-urlencoded`<!-- -->, and `multipart/form-data` content types.\n\nIf the `Content-Type` header is not set, it will return `null`<!-- -->.\n\n\n</td></tr>\n<tr><td>\n\n[pathname](#)\n\n\n</td><td>\n\n`readonly`\n\n\n</td><td>\n\nstring\n\n\n</td><td>\n\nURL pathname. Does not include the protocol, domain, query string (search params) or hash.\n\nhttps://developer.mozilla.org/en-US/docs/Web/API/URL/pathname\n\n\n</td></tr>\n<tr><td>\n\n[platform](#)\n\n\n</td><td>\n\n`readonly`\n\n\n</td><td>\n\nPLATFORM\n\n\n</td><td>\n\nPlatform specific data and functions\n\n\n</td></tr>\n<tr><td>\n\n[query](#)\n\n\n</td><td>\n\n`readonly`\n\n\n</td><td>\n\nURLSearchParams\n\n\n</td><td>\n\nURL Query Strings (URL Search Params). Use `params` to instead retrieve the route params found in the url pathname.\n\nhttps://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams\n\n\n</td></tr>\n<tr><td>\n\n[request](#)\n\n\n</td><td>\n\n`readonly`\n\n\n</td><td>\n\nRequest\n\n\n</td><td>\n\nHTTP request information.\n\n\n</td></tr>\n<tr><td>\n\n[sharedMap](#)\n\n\n</td><td>\n\n`readonly`\n\n\n</td><td>\n\nMap&lt;string, any&gt;\n\n\n</td><td>\n\nShared Map across all the request handlers. Every HTTP request will get a new instance of the shared map. The shared map is useful for sharing data between request handlers.\n\n\n</td></tr>\n<tr><td>\n\n[signal](#)\n\n\n</td><td>\n\n`readonly`\n\n\n</td><td>\n\nAbortSignal\n\n\n</td><td>\n\nRequest's AbortSignal (same as `request.signal`<!-- -->). This signal indicates that the request has been aborted.\n\n\n</td></tr>\n<tr><td>\n\n[url](#)\n\n\n</td><td>\n\n`readonly`\n\n\n</td><td>\n\nURL\n\n\n</td><td>\n\nHTTP request URL.\n\n\n</td></tr>\n</tbody></table>",
317317
"editUrl": "https://github.com/QwikDev/qwik/tree/main/packages/qwik-city/src/middleware/request-handler/types.ts",
318318
"mdFile": "qwik-city.requesteventbase.md"
319319
},

packages/docs/src/routes/api/qwik-city-middleware-request-handler/index.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1032,7 +1032,7 @@ URL
10321032
10331033
</td><td>
10341034
1035-
HTTP request Canonical URL.
1035+
The original HTTP request URL.
10361036
10371037
This property was introduced to support the rewrite feature.
10381038

packages/qwik-city/src/middleware/request-handler/types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ export interface RequestEventBase<PLATFORM = QwikCityPlatform> {
298298
readonly url: URL;
299299

300300
/**
301-
* HTTP request Canonical URL.
301+
* The original HTTP request URL.
302302
*
303303
* This property was introduced to support the rewrite feature.
304304
*

0 commit comments

Comments
 (0)