feat(http): 🔧 Simplify HTTP request methods to use post and get directly#24
feat(http): 🔧 Simplify HTTP request methods to use post and get directly#24cl-bruant-steineur wants to merge 2 commits into
post and get directly#24Conversation
…irectly * Replaced `this.http.request` with `this.http.post` and `this.http.get` in multiple modules for cleaner code. * Updated methods in `AbsencesModule`, `CloudModule`, `DocumentsModule`, `GradesModule`, `HomeworkModule`, `MessagingModule`, `SettingsModule`, `TimelineModule`, and `TimetableModule`.
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📝 WalkthroughWalkthroughThis PR refactors HTTP client method routing by introducing lowercase verb parameters and convenience wrappers, then migrates all API call sites across authentication, data access, messaging, and settings modules to use the new methods consistently. ChangesHTTP Client Refactoring and Module Migration
🎯 4 (Complex) | ⏱️ ~45 minutes
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/utils/http.ts`:
- Line 97: The debug console.log line leaks sensitive data (headers:
X-Token/X-Gtk and potentially body with credentials); remove or replace it with
a sanitized log. Locate the console.log(url.toString(), verbe, body, params,
headers, result) call and either delete it or call a logger with a sanitized
payload: strip or mask header keys "X-Token" and "X-Gtk" and redact credential
fields in body before logging (implement a small sanitizer helper used here).
Ensure the final log only includes non-sensitive values (e.g., url, verbe,
params, result status) and never raw headers or full body content.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 42502ac8-2df9-4877-9fc2-4569a03e7568
📒 Files selected for processing (11)
src/index.tssrc/modules/AbsencesModule.tssrc/modules/CloudModule.tssrc/modules/DocumentsModule.tssrc/modules/GradesModule.tssrc/modules/HomeworkModule.tssrc/modules/MessagingModule.tssrc/modules/SettingsModule.tssrc/modules/TimelineModule.tssrc/modules/TimetableModule.tssrc/utils/http.ts
this.http.requestwiththis.http.postandthis.http.getin multiple modules for cleaner code.AbsencesModule,CloudModule,DocumentsModule,GradesModule,HomeworkModule,MessagingModule,SettingsModule,TimelineModule, andTimetableModule.Summary by CodeRabbit
Release Notes