You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add custom HTTP client support for cross-platform compatibility
Adds support for custom fetch implementations to enable usage in restrictive
environments like Obsidian plugins, browser extensions, Electron apps, React
Native, and enterprise environments with specific networking requirements.
Key features:
- CustomFetch and CustomFetchResponse types for HTTP client abstraction
- Backward-compatible TodoistApi constructor with options object pattern
- OAuth functions (getAuthToken, revokeAuthToken, revokeToken) support custom fetch
- Complete HTTP layer integration with retry logic and error handling preserved
- File upload support with custom fetch implementations
- All existing transforms (snake_case ↔ camelCase) work automatically
- Comprehensive documentation and usage examples
Resolves#381
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
- All existing transforms (snake_case ↔ camelCase) work automatically with custom fetch
108
+
- Retry logic and error handling are preserved
109
+
- File uploads work with custom fetch implementations
110
+
- The custom fetch function should handle FormData for multipart uploads
111
+
- Timeout parameter is optional and up to your custom implementation
112
+
41
113
## Development and Testing
42
114
43
115
Instead of having an example app in the repository to assist development and testing, we have included [ts-node](https://github.com/TypeStrong/ts-node) as a dev dependency. This allows us to have a scratch file locally that can import and utilize the API while developing or reviewing pull requests without having to manage a separate app project.
0 commit comments