Skip to content

refactor: replace axios with native HTTP calls#9360

Open
adiologydev wants to merge 1 commit intocoollabsio:nextfrom
adiologydev:adiologydev/migrate-axios-to-native-fetch-api
Open

refactor: replace axios with native HTTP calls#9360
adiologydev wants to merge 1 commit intocoollabsio:nextfrom
adiologydev:adiologydev/migrate-axios-to-native-fetch-api

Conversation

@adiologydev
Copy link
Copy Markdown
Member

@adiologydev adiologydev commented Mar 31, 2026

Changes

Remove axios dependency from both root and coolify-realtime packages. Terminal server now uses an httpPost helper built on Node's http module (Soketi image is locked to Node 16 which lacks global fetch). Updated public/js/echo.js from laravel-echo v1.15.3 to v2.2.7 (matches package.json).

Note: We should migrate to Laravel Reverb, socketi last updated 4 years ago.

Issues

  • No need for this dependency.

Category

  • Improvement

AI Assistance

  • AI was used (please describe below)

If AI was used:

  • Tools used: Claude Opus 4.6
  • How extensively: Mostly

Testing

Ran spin up and tested terminal to make sure realtime works

Contributor Agreement

Important

  • I have read and understood the contributor guidelines. If I have failed to follow any guideline, I understand that this PR may be closed without review.
  • I have searched existing issues and pull requests (including closed ones) to ensure this isn't a duplicate.
  • I have tested all the changes thoroughly with a local development instance of Coolify and I am confident that they will work as expected when a maintainer tests them.

Remove axios dependency from both root and coolify-realtime packages.
Terminal server now uses an httpPost helper built on Node's http module
(Soketi image is locked to Node 16 which lacks global fetch). Updated
public/js/echo.js from laravel-echo v1.15.3 to v2.2.7.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@adiologydev
Copy link
Copy Markdown
Member Author

@coderabbitai review?

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 31, 2026

@adiologydev I'll get right on it! 🤖💪 Consider it done — I'll be back... with review comments. Let me scan these changes faster than a T-800 scans a target.

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@adiologydev
Copy link
Copy Markdown
Member Author

@claude review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 31, 2026

Caution

Review failed

Failed to post review comments

Walkthrough

This pull request removes the axios HTTP client library from both the root and realtime service dependencies, and replaces its usage in the terminal server with a custom httpPost utility function that uses Node's built-in http.request. A new httpPost helper is exported from terminal-utils.js to handle POST requests with simplified response handling. Additionally, the Laravel Echo JavaScript library is updated to a newer version with changes to channel helper methods and event handling logic. The terminal authentication and IP retrieval flows now use the new utility instead of the external dependency.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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