-
Notifications
You must be signed in to change notification settings - Fork 352
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
Mapbox GL fixes: handle Request
objects as URLs (and array buffer responses discussion)
#220
Conversation
I think those test failures are linting errors on files not changed in this PR? |
@tombh thanks for taking the time in opening up this PR!
This is definitely something that we should handle and should've been considered but I guess was missed. Can you split this into a separate PR so we can get this in faster as the ArrayBuffer work is going to be a bit more time consuming. One note:
Due to the current nature of the client server API ( Im not exactly sure how you want to proceed with this but supporting binary data would need to work across all recording modes in order to be merged in. |
As well as WHATWG's URL objects it's possible to receive `Request` objects as 'URLs'. So handle such cases by extracting the URL property.
Request
objects as URLs and array buffer responsesRequest
objects as URLs (and array buffer responses discussion)
Ok I've removed the ArrayBuffer fix and added a test for the Request object fix. BTW is there not a way to run a single test? My laptop quite struggles with |
Again tests seem to fail because of an unassociated linting errors. But in fact I don't even seem to be able to see my added test in the logs. |
Thanks for taking the time to land this @tombh. The CI failures are unrelated, we'll fix them separately.
Yeah, the current test/build system needs some work for sure. You can run a single test by using |
Description
These are fixes I needed to get Polly working with Mapbox GL. So far the handling of an array buffer response is only for passthrough requests, not recording, is that a reasonable first step? There are no tests because I'd like some help thinking about how to test these.
Motivation and Context
I wonder if the handling of
Request
objects for URLs has already been considered? It's just that the the coercion of those objects into a URL string isn't handled simply by casting to a string?I see in #183 that array buffer responses have already been considered.
Types of Changes
Checklist