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

CARTO: Don't hardcode mime-types #8076

Merged
merged 2 commits into from
Aug 23, 2023
Merged

CARTO: Don't hardcode mime-types #8076

merged 2 commits into from
Aug 23, 2023

Conversation

felixpalmer
Copy link
Collaborator

Followup to #8056

Background

The old versions of the CARTO API did not set explicit mime-types for responses. Both the vector and spatial index binary format simply returned Content-Type: application/x-protobuf which meant loaders.gl has no way to select a loader automatically. As of v=3.2 the API returns explicit mimeTypes so loaders.gl can automatically select the correct loader without having to be informed explictly via loadOptions

Change List

  • Remove hardcoded mime-types in Layer classes
  • Update test mock API to return mime-type for binary vector tile responses

@felixpalmer felixpalmer requested a review from zbigg August 23, 2023 08:21
Copy link
Collaborator

@zbigg zbigg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@felixpalmer felixpalmer merged commit 7d74676 into master Aug 23, 2023
2 checks passed
@felixpalmer felixpalmer deleted the felix/carto-mime-types branch August 23, 2023 13:25
Pessimistress pushed a commit that referenced this pull request Aug 24, 2023
felixpalmer added a commit that referenced this pull request Aug 25, 2023
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.

2 participants