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

Fix docs for new HTTP::Server API #6179

Merged

Conversation

straight-shoota
Copy link
Member

Follow-up on #5776

The examples in the updated API docs for HTTP::Server did not reflect the eventual method name bind_tcp.

@@ -131,6 +131,11 @@ class HTTP::Server
# Creates a `TCPServer` listenting on `host:port` and adds it as a socket, returning the local address
# and port the server listens on.
#
# ```
# server = HTTP::Server.new { }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More related to the implementation than this doc, but initializing with an empty Proc looks a bit weird.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, but these examples are to demonstrate the bind methods, not handlers. So I think this is fine.
We could add some hello world to the handler, but this just adds house not relevant to the immediate purpose.

@sdogruyol sdogruyol merged commit a9bab0c into crystal-lang:master Jun 12, 2018
@straight-shoota straight-shoota deleted the jm/fix/http-server-docs branch June 12, 2018 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants