Add new constructor which takes an Endpoint instance
Merge pull request #581 from markewallace/ConstructorWithEndpoint

Add new constructor which takes an Endpoint instance