Skip to content
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

feat: support backend property on both Request and Response, as a Backend instance #1019

Merged
merged 5 commits into from
Oct 22, 2024

Conversation

guybedford
Copy link
Member

This updates req and res objects to provide a backend property lookup that now returns a Backend instance instead of a string.

This can be useful for checking the backend information a response was taken from, eg:

const res = await fetch('https://site.com/blah');
console.log(res.backend.isSSL);

etc. etc. with all the new backend options.

@guybedford guybedford changed the title feat: support backend property on both Request and Response, as a Backend instance fix: support backend property on both Request and Response, as a Backend instance Oct 22, 2024
@guybedford guybedford merged commit 4e3b93d into main Oct 22, 2024
21 of 23 checks passed
@guybedford guybedford deleted the backend-obj branch October 22, 2024 23:51
@guybedford guybedford changed the title fix: support backend property on both Request and Response, as a Backend instance feat: support backend property on both Request and Response, as a Backend instance Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant