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

Documentation improvements for http_get/3 and http_open/3 #22

Closed
triska opened this issue Nov 1, 2015 · 1 comment
Closed

Documentation improvements for http_get/3 and http_open/3 #22

triska opened this issue Nov 1, 2015 · 1 comment

Comments

@triska
Copy link
Member

triska commented Nov 1, 2015

First, a very simple discrepancy I noticed: In http_get/3, the reply_header(Hs) option yields a list of Name(Value) pairs, but the documentation states it yields a list of Name=Value pairs. I guess it is the documentation that should be changed in this case, although yielding a list of Name=Value pairs would indeed also make a lot of sense in my view.

Second, a more elementary request for clarification:

Throughout the documentation of the HTTP libraries, library(http_open) is referred to as a "Simple HTTP client" and "lightweight library for opening a[n] HTTP URL address as a Prolog stream". In addition: "It can only deal with the HTTP GET protocol".

In contrast, library(http_client) and its http_get/3 is described as providing "more powerful access to reading HTTP resources", including "keep-alive, chunked transfer and a plug-in mechanism providing conversions based on the MIME content-type".

From this, one gets the distinct impression that one should better use http_get/3 to be on the safe side, choosing the more powerful library to make the application future-proof for further features.

Somewhat contradicting the above, we learn in other sections of the documentation that library(http_open) can in fact "be extended by loading two additional modules that acts [sic] as plugins", enabling chunked transfer encoding and the POST method in addition to GET, HEAD and DELETE, and in #9, you even state that "http_get/3 is basically superseded by http_open/3".

Please clarify the documentation so that all testing, usage and development focuses on the library that is meant to be used more thoroughly. Thank you!

@JanWielemaker
Copy link
Member

Pushed some stuff that fixes the most obvious mistakes and better explains the relation between the two libraries and what will happen to them. I'll try to find time to add Keep-alive support to http_open/3, so we have one library that supports all the basics rather than two that both lack vital functionality.

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

No branches or pull requests

2 participants