module Async::HTTP::Proxy::Client

def proxied_client(endpoint, headers = nil)

Create a client that will proxy requests through the current client.
def proxied_client(endpoint, headers = nil)
	proxy = self.proxy(endpoint, headers)
	
	return self.class.new(proxy.wrap_endpoint(endpoint))
end

def proxied_endpoint(endpoint, headers = nil)

def proxied_endpoint(endpoint, headers = nil)
	proxy = self.proxy(endpoint, headers)
	
	return proxy.wrap_endpoint(endpoint)
end

def proxy(endpoint, headers = nil)

def proxy(endpoint, headers = nil)
	Proxy.new(self, endpoint.authority(false), headers)
end