apple / pkl

A configuration as code language with rich validation and tooling.
https://pkl-lang.org
Apache License 2.0
9.85k stars 258 forks source link

Introduce specialized ModuleKey(Factory) for `http` uris #495

Closed bioball closed 1 month ago

bioball commented 1 month ago

GenericUrl is a catch-all that uses URL.openConnection(). Since we now have special handling of HTTP urls, it makes more sense to put it in its own module key.

Those that don't use the Http module key specifically but use GenericUrl will still be able to fetch http urls, but it would use the standard URL.openConnection implementation. This works the same as file: URIs; if only the GenericUrl module key factory is used, Pkl can still load file: uris.

(FYI @translatenix)