Skip to content

feat: add HTTP interceptor support#1101

Open
dballance wants to merge 1 commit intomapbox:mainfrom
Tango-Tango:feat/add-http-interceptor-support
Open

feat: add HTTP interceptor support#1101
dballance wants to merge 1 commit intomapbox:mainfrom
Tango-Tango:feat/add-http-interceptor-support

Conversation

@dballance
Copy link

What does this pull request do?

Adds HTTP interceptor support, in Dart, to match up to the native SDK functionality.

The interceptors are added before a map is instantiated, so that all requests (including fonts, images, etc) can be modified / logged / observed when the map is created. All map instances will share the same interceptor, much like the existing SDK functionality.

I'm opening this first to get feedback on the overall approach - will add tests if needed. Seems most of the native code is only tested indirectly, so would potentially just be an integration test of some sort.

What is the motivation and context behind this change?

Allow per request header modifications, logging, and tracing spans on map requests. Would potentially close #1062 and other stories.

Pull request checklist:

  • Add a changelog entry.
  • Write tests for all new functionality. If tests were not written, please explain why.
  • Add documentation comments for any added or updated public APIs.

PRs must be submitted under the terms of our Contributor License Agreement CLA.

@dballance dballance requested a review from a team as a code owner February 10, 2026 23:58
@dballance dballance requested a review from evil159 February 10, 2026 23:58
@CLAassistant
Copy link

CLAassistant commented Feb 10, 2026

CLA assistant check
All committers have signed the CLA.

@dballance
Copy link
Author

@mapbox/mapbox-maps-flutter - @evil159 - Any thoughts here?

@pjleonard37
Copy link
Contributor

Hi @dballance -- Thanks for the PR! We'll take a look early next week. 😀

@dballance
Copy link
Author

Great - thanks - happy to rework or extend if needed!

# Conflicts:
#	CHANGELOG.md
#	ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/MapboxMapController.swift
#	lib/src/mapbox_map.dart
@dballance dballance force-pushed the feat/add-http-interceptor-support branch from 4015162 to 2849f76 Compare February 13, 2026 19:30
@pjleonard37
Copy link
Contributor

Hi @dballance --

A few things came up earlier this week, but this is first on my to do list tomorrow.

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.

Support setting custom HTTP headers before Map initialization

3 participants

Comments