-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement the Astro.request RFC #2913
Conversation
🦋 Changeset detectedLatest commit: 093bf9a The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left one request
ion about logging, but Let's GET this money 💰
/** set props for this astro component (along with default values) */ | ||
props: Record<string, number | string | any>; | ||
/** get information about this page */ | ||
request: AstroRequest; | ||
request: Request; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
love this change 👏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seriously, it's the little things :)
a574111
to
e16fbab
Compare
} | ||
|
||
// Headers are only available when using SSR. | ||
const request = createRequest({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIL that Node.js http.IncomingMessage
wasn't a Request
object... For some reason I thought that that had always been the case!
Did my best to fix merge conflicts for you. If you need to, you can force-push your local branch back up github to revert my fixes. |
* Implement the Astro.request RFC * Disable console warnings eslint * Use our logger * Adds a changeset * Fix tests that depend on params, canonicalURL, URL Co-authored-by: Fred K. Schott <[email protected]>
Changes
Astro.request
RFC changes: https://github.com/withastro/rfcs/blob/main/proposals/0018-astro-request.mdAstro.request.params
andAstro.request.canonicalURL
.Testing
Tests updated
Docs