Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow HTTP::Client block initializer to be used when passing an URI #3521

Merged
merged 3 commits into from
Nov 16, 2016

Conversation

philnash
Copy link
Contributor

@philnash philnash commented Nov 8, 2016

This pull request addresses issue #3492.

It adds tests to make sure that passing a URI or a host, port, tls combination both yield a client to a block.

It tightens up the types on the initializers for HTTP::Client, expecting a string for host names in particular.

It includes a second definition of self.new(uri : URI, tls = nil) which yields to a block and completes this task.

All feedback welcome 🙂

@asterite
Copy link
Member

Looks good, thank you! ❤️

@asterite asterite merged commit 8f053fb into crystal-lang:master Nov 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants