Drop axios from hook-sdk#2977
Merged
Weltraumschaf merged 3 commits intosecureCodeBox:mainfrom May 26, 2025
Merged
Conversation
✅ Deploy Preview for docs-securecodebox ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
|
Signed-off-by: Jannik Hollenbach <jannik.hollenbach@owasp.org>
Signed-off-by: Jannik Hollenbach <jannik.hollenbach@owasp.org>
…dback Signed-off-by: Jannik Hollenbach <jannik.hollenbach@owasp.org>
|
There was a problem hiding this comment.
Pull Request Overview
This PR removes axios as a dependency from the hook-sdk and replaces it with the built-in fetch API. Key changes include:
- Removal of the axios dependency from package.json.
- Replacement of axios calls with fetch in hook-wrapper.js.
- Refactoring promise-based functions to async/await with updated error handling.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| hook-sdk/nodejs/package.json | Removed axios dependency to reduce external dependencies. |
| hook-sdk/nodejs/hook-wrapper.js | Replaced axios calls with fetch and updated function signatures accordingly. |
Comments suppressed due to low confidence (1)
hook-sdk/nodejs/hook-wrapper.js:38
- The 'content-type' header is set to an empty string. Please specify a valid content-type header (e.g., 'application/json' or other appropriate type) to ensure the server correctly interprets the uploaded file contents.
headers: { "content-type": "" },
Weltraumschaf
approved these changes
May 26, 2025
This file contains hidden or 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
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.



Description
Drops axios from hook-sdk dependencies and switches to the build in fetch function.
Checklist