protojure / lib

A collection of libraries to support Protojure applications at runtime
https://protojure.readthedocs.io
Apache License 2.0
64 stars 14 forks source link

Improve tolerance of :uri parsing to connect #134

Open reify-james-vickers opened 2 years ago

reify-james-vickers commented 2 years ago

Currently protojure.grpc.client.providers.http2/connect requires a very specific format for :uri and does not accept some that it perhaps could. The URI's it seems to accept have scheme as well as port number, e.g. http://localhost:8080. Any piece missing makes the parsing fail, sometimes with a relatively opaque exception. It would be helpful for instance to support formats like:

ghaskins commented 2 years ago

Yeah, this has bugged me for a while, too. Just never got around to fixing it. PR welcome.

reify-james-vickers commented 2 years ago

https://github.com/protojure/lib/pull/137

Found it a bit harder to support something like "something.com" with no scheme because lambdaisland/uri apparently won't read a host from that, doesn't seem too important anyway.