endpoints icon indicating copy to clipboard operation
endpoints copied to clipboard

WebServer should be able to create a WebClient that can query it

Open Jaymon opened this issue 4 years ago • 0 comments

It's common when you start a webserver to not know the host until the webserver has started, so to create a client you would do something like:

c = WebClient(server.host)

But why can't the server just do that?

c = server.create_client()

This would also make it so you don't have to import endpoints.client.WebClient into your module

Jaymon avatar Jul 11 '19 22:07 Jaymon