-
Notifications
You must be signed in to change notification settings - Fork 19
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: use cross-fetch instead of XMLHttpRequest to handle redirects #15
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Since |
mi-xu
changed the title
feat: use axios instead of XMLHttpRequest to handle redirects
feat: use cross-fetch instead of XMLHttpRequest to handle redirects
Sep 27, 2019
mirceanis
reviewed
Oct 1, 2019
mirceanis
approved these changes
Oct 1, 2019
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.
looks good to me
mirceanis
pushed a commit
that referenced
this pull request
Oct 24, 2019
* feat: use axios instead of XMLHttpRequest to handle redirects * bump version to publish dev version * refactor: replace axios with cross-fetch * style: remove some trailing commas * chore: fix trailing comma auto-format
🎉 This PR is included in version 1.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
veramo-bot
pushed a commit
to veramolabs/plc-did-resolver
that referenced
this pull request
Apr 26, 2023
# 1.0.0 (2023-04-26) ### Bug Fixes * **build:** publish types in package.json ([174afe8](174afe8)) * CORS bug ([decentralized-identity#88](https://github.com/veramolabs/plc-did-resolver/issues/88)) ([2a5b5d1](2a5b5d1)) * **deps:** bump did-resolver to 3.1.0 ([08358ec](08358ec)) * **deps:** bump did-resolver to 3.1.3 ([f62af45](f62af45)) * **deps:** groom the build scripts and dependencies ([decentralized-identity#120](https://github.com/veramolabs/plc-did-resolver/issues/120)) ([757f6ec](757f6ec)) * **deps:** pin dependencies ([decentralized-identity#89](https://github.com/veramolabs/plc-did-resolver/issues/89)) ([926eb1f](926eb1f)) * **deps:** update all non-major dependencies ([decentralized-identity#93](https://github.com/veramolabs/plc-did-resolver/issues/93)) ([13d8f18](13d8f18)) * **deps:** update all non-major dependencies to v17.0.2 ([0e9e2f0](0e9e2f0)) * **deps:** update all non-major dependencies to v18.1.0 ([cd3ed19](cd3ed19)) * **deps:** update all non-major dependencies to v18.2.0 ([cd99aa3](cd99aa3)) * **deps:** update dependencies, remove ts-jest ([789ec69](789ec69)) * **deps:** update dependency did-resolver to v1.1.0 ([decentralized-identity#39](https://github.com/veramolabs/plc-did-resolver/issues/39)) ([4ade39d](4ade39d)) * **deps:** update dependency did-resolver to v2 ([decentralized-identity#56](https://github.com/veramolabs/plc-did-resolver/issues/56)) ([b420866](b420866)) * **deps:** update dependency did-resolver to v2.1.1 ([decentralized-identity#70](https://github.com/veramolabs/plc-did-resolver/issues/70)) ([0a0f902](0a0f902)) * **deps:** update dependency did-resolver to v3 ([decentralized-identity#94](https://github.com/veramolabs/plc-did-resolver/issues/94)) ([18d1a1d](18d1a1d)) * **deps:** Update dependency did-resolver to v3.1.1 ([91cc1c6](91cc1c6)) * **deps:** Update dependency did-resolver to v3.1.2 ([7902b3f](7902b3f)) * **deps:** Update dependency did-resolver to v3.1.3 ([d77839f](d77839f)) * **deps:** Update dependency did-resolver to v3.1.4 ([02d4c7d](02d4c7d)) * **deps:** Update dependency did-resolver to v3.1.5 ([0728ffb](0728ffb)) * **deps:** Update dependency did-resolver to v3.2.0 ([d33f51e](d33f51e)) * **deps:** Update dependency did-resolver to v3.2.2 ([f494fbe](f494fbe)) * **deps:** Update dependency did-resolver to v4 ([74b825f](74b825f)) * **deps:** Update dependency did-resolver to v4.0.1 ([63d7fc2](63d7fc2)) * **deps:** Update dependency did-resolver to v4.1.0 ([81fa649](81fa649)) * **deps:** update dependency react-scripts to v5 ([bbc4b35](bbc4b35)) * **deps:** update dependency react-scripts to v5.0.1 ([36d0e22](36d0e22)) * **deps:** update react monorepo to v18 ([8f21c88](8f21c88)) * remove checks for a [@context](https://github.com/context) field ([b814b6c](b814b6c)), closes [decentralized-identity#26](https://github.com/veramolabs/plc-did-resolver/issues/26) ### Features * forked web-did-resolver and refactored to be plc-did-resolver ([7fdeefe](7fdeefe)) * remove default export ([3952bef](3952bef)) * remove default export ([9ef0b37](9ef0b37)) * support for path in the did ([904d88c](904d88c)), closes [decentralized-identity#32](https://github.com/veramolabs/plc-did-resolver/issues/32) [decentralized-identity#33](https://github.com/veramolabs/plc-did-resolver/issues/33) * update to latest did spec ([decentralized-identity#92](https://github.com/veramolabs/plc-did-resolver/issues/92)) ([4779436](4779436)), closes [decentralized-identity#91](https://github.com/veramolabs/plc-did-resolver/issues/91) * use cross-fetch instead of XMLHttpRequest ([decentralized-identity#15](https://github.com/veramolabs/plc-did-resolver/issues/15)) ([dadf682](dadf682)) * use cross-fetch instead of XMLHttpRequest ([decentralized-identity#15](https://github.com/veramolabs/plc-did-resolver/issues/15)) ([4378c71](4378c71)) ### BREAKING CHANGES * Resolver now returns a `DIDResolutionResult` that wraps a DIDDocument. No errors are thrown, instead returned as `didResolutionMetadata.error/message`
veramo-bot
pushed a commit
to veramolabs/peer-did-resolver
that referenced
this pull request
Jan 22, 2024
# 1.0.0 (2024-01-22) ### Bug Fixes * CORS bug ([decentralized-identity#88](https://github.com/veramolabs/peer-did-resolver/issues/88)) ([2a5b5d1](2a5b5d1)) * **deps:** bump @aviarytech/did-peer to 0.0.22 ([#3](#3)) ([3605a4a](3605a4a)) * **deps:** bump did-resolver to 3.1.0 ([08358ec](08358ec)) * **deps:** bump did-resolver to 3.1.3 ([f62af45](f62af45)) * **deps:** groom the build scripts and dependencies ([decentralized-identity#120](https://github.com/veramolabs/peer-did-resolver/issues/120)) ([757f6ec](757f6ec)) * **deps:** pin dependencies ([decentralized-identity#89](https://github.com/veramolabs/peer-did-resolver/issues/89)) ([926eb1f](926eb1f)) * **deps:** update all non-major dependencies ([decentralized-identity#93](https://github.com/veramolabs/peer-did-resolver/issues/93)) ([13d8f18](13d8f18)) * **deps:** update all non-major dependencies to v17.0.2 ([0e9e2f0](0e9e2f0)) * **deps:** update all non-major dependencies to v18.1.0 ([cd3ed19](cd3ed19)) * **deps:** update all non-major dependencies to v18.2.0 ([cd99aa3](cd99aa3)) * **deps:** update dependencies, remove ts-jest ([789ec69](789ec69)) * **deps:** update dependency did-resolver to v1.1.0 ([decentralized-identity#39](https://github.com/veramolabs/peer-did-resolver/issues/39)) ([4ade39d](4ade39d)) * **deps:** update dependency did-resolver to v2 ([decentralized-identity#56](https://github.com/veramolabs/peer-did-resolver/issues/56)) ([b420866](b420866)) * **deps:** update dependency did-resolver to v2.1.1 ([decentralized-identity#70](https://github.com/veramolabs/peer-did-resolver/issues/70)) ([0a0f902](0a0f902)) * **deps:** update dependency did-resolver to v3 ([decentralized-identity#94](https://github.com/veramolabs/peer-did-resolver/issues/94)) ([18d1a1d](18d1a1d)) * **deps:** Update dependency did-resolver to v3.1.1 ([91cc1c6](91cc1c6)) * **deps:** Update dependency did-resolver to v3.1.2 ([7902b3f](7902b3f)) * **deps:** Update dependency did-resolver to v3.1.3 ([d77839f](d77839f)) * **deps:** Update dependency did-resolver to v3.1.4 ([02d4c7d](02d4c7d)) * **deps:** Update dependency did-resolver to v3.1.5 ([0728ffb](0728ffb)) * **deps:** Update dependency did-resolver to v3.2.0 ([d33f51e](d33f51e)) * **deps:** Update dependency did-resolver to v3.2.2 ([f494fbe](f494fbe)) * **deps:** Update dependency did-resolver to v4 ([74b825f](74b825f)) * **deps:** Update dependency did-resolver to v4.0.1 ([63d7fc2](63d7fc2)) * **deps:** update dependency react-scripts to v5 ([bbc4b35](bbc4b35)) * **deps:** update dependency react-scripts to v5.0.1 ([36d0e22](36d0e22)) * **deps:** update react monorepo to v18 ([8f21c88](8f21c88)) * remove checks for a [@context](https://github.com/context) field ([b814b6c](b814b6c)), closes [decentralized-identity#26](https://github.com/veramolabs/peer-did-resolver/issues/26) ### Features * refactor to resolve peer-did ([e04640c](e04640c)) * remove default export ([3952bef](3952bef)) * remove default export ([9ef0b37](9ef0b37)) * support for path in the did ([904d88c](904d88c)), closes [decentralized-identity#32](https://github.com/veramolabs/peer-did-resolver/issues/32) [decentralized-identity#33](https://github.com/veramolabs/peer-did-resolver/issues/33) * update to latest did spec ([decentralized-identity#92](https://github.com/veramolabs/peer-did-resolver/issues/92)) ([4779436](4779436)), closes [decentralized-identity#91](https://github.com/veramolabs/peer-did-resolver/issues/91) * use cross-fetch instead of XMLHttpRequest ([decentralized-identity#15](https://github.com/veramolabs/peer-did-resolver/issues/15)) ([dadf682](dadf682)) * use cross-fetch instead of XMLHttpRequest ([decentralized-identity#15](https://github.com/veramolabs/peer-did-resolver/issues/15)) ([4378c71](4378c71)) ### BREAKING CHANGES * Resolver now returns a `DIDResolutionResult` that wraps a DIDDocument. No errors are thrown, instead returned as `didResolutionMetadata.error/message`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes #14
XMLHttpRequest
withaxios
for making Ajax requests. This provides a higher level syntax for simpler and more robust handling of HTTP responses with a status other than 200. It comes at the cost of an additional 1.8kb package dependency (gzipped + minified), which I feel is worth the tradeoff compared to reinventing the wheel for handling a lot of edge cases.Test by registering the resolver to resolve "did:web:uport.me"
@ajunge @mirceanis does this solution work for the issues you encountered?