summaryrefslogtreecommitdiff
path: root/docs/api.md
diff options
context:
space:
mode:
authorGravatar Matthew Phillips <matthew@matthewphillips.info> 2021-04-27 14:00:33 -0400
committerGravatar GitHub <noreply@github.com> 2021-04-27 14:00:33 -0400
commit41c64b30af7ed34c1a870b6f273a2889fa2df102 (patch)
tree5bbaf30bcb43ec5d4eb47e9188b639c3298c6f3b /docs/api.md
parentdea1a6dfc9dec54034d2b872b4cd36c0174814c6 (diff)
downloadastro-41c64b30af7ed34c1a870b6f273a2889fa2df102.tar.gz
astro-41c64b30af7ed34c1a870b6f273a2889fa2df102.tar.zst
astro-41c64b30af7ed34c1a870b6f273a2889fa2df102.zip
Move the `request` object from import.meta to Astro (#134)
* Move the `request` object from import.meta to Astro This moves the `request` object to the Astro "global" (really just a render-level variable). * Document Astro.request
Diffstat (limited to 'docs/api.md')
-rw-r--r--docs/api.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/api.md b/docs/api.md
index 785f9a83b..d3af1564f 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -43,6 +43,14 @@ const data = Astro.fetchContent('../pages/post/*.md'); // returns an array of po
}[];
```
+#### `request`
+
+`Astro.request` returns an object with the following properties:
+
+| Name | Type | Description |
+| :----- | :------- | :--------------------------------------------------------------------------------------------------------- |
+| `url` | `URL` | The URL of the request being rendered. |
+
### `collection`
```jsx