Skip to content

Conversation

@jonaslagoni
Copy link
Contributor

@jonaslagoni jonaslagoni commented Dec 26, 2025

Note

Introduces a feature-rich TypeScript HTTP client generator with shared common types and utilities, reducing duplication and adding robust request/response capabilities.

  • Adds renderHttpCommonTypes (auth union, pagination configs, retry policy with backoff, hook interfaces, response wrapper with pagination helpers) and injects it once per generation; resets state via resetHttpCommonTypesState
  • Rewrites HTTP function generation: unified context per operation, support for path parameters (buildUrlWithParameters), typed request headers merging, query params, multiple pagination strategies, standardized error handling, and OAuth2 flows (client_credentials/password, token refresh) plus bearer/basic/API key
  • Enhances retry logic with exponential backoff and configurable policies; extensibility via beforeRequest/makeRequest/afterResponse/onError hooks
  • Generalizes body handling to POST/PUT/PATCH and keeps GET/HEAD etc. bodyless; maintains multi-status response unmarshalling
  • Updates docs (docs/protocols/http_client.md) with usage examples, feature matrix, auth/pagination/retry/hooks sections; adjusts tests, snapshots, and runtime fixtures; simplifies HTTP test script

Written by Cursor Bugbot for commit 398c2e6. This will update automatically on new commits. Configure here.

@netlify
Copy link

netlify bot commented Dec 26, 2025

Deploy Preview for the-codegen-project canceled.

Name Link
🔨 Latest commit 398c2e6
🔍 Latest deploy log https://app.netlify.com/projects/the-codegen-project/deploys/694efdb2872ece0008cb06f4

@jonaslagoni jonaslagoni merged commit 388ceae into main Dec 26, 2025
20 checks passed
@jonaslagoni jonaslagoni deleted the refactor_http branch December 26, 2025 21:35
@jonaslagoni
Copy link
Contributor Author

🎉 This PR is included in version 0.62.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants