Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rl/custom source header #870

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

azaderdogan
Copy link

@azaderdogan azaderdogan commented Feb 19, 2025

This pull request introduces a setCustomHttpHeader method to allow the plugin to modify HTTP headers dynamically. The implementation includes a CustomHttpServiceInterceptor that overrides onRequest and onResponse methods to handle custom headers. This ensures better flexibility for API requests while using mapbox_maps_flutter.

Currently, mapbox_maps_flutter does not provide a built-in way to modify HTTP headers dynamically. This change enables developers to set custom headers, such as authentication tokens or tracking headers, without modifying the core plugin. The implementation also ensures seamless integration with both iOS and Android, using interceptors where necessary.

azad.erdogan added 2 commits February 19, 2025 15:56
- Implement custom HTTP headers functionality for Android and iOS
- Add `setCustomHeaders` method to MapboxMap and MapboxHttpService
- Create CustomHttpServiceInterceptor for both platforms
- Include example demonstrating custom header usage
- Update main example app to showcase new feature
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