This allows adding more options in elegant ways, showcased here by HTTP basic auth and by injecting a custom http.Client. Fixes #341 and #372.