HTTP Library: First iteration.
[Thread Prev] | [Thread Next]
[Date Prev] | [Date Next]
- Subject: HTTP Library: First iteration.
- From: Ori Bernstein <ori@xxxxxxxxxxxxxx>
- Date: Sun, 19 Jun 2016 18:50:07 -0700
- To: myrddin-dev@xxxxxxxxxxxxxx
http://git.eigenstate.org/ori/libhttp.git/tree/ At the moment, the API is extremely basic, and only does synchronous stuff. An example program also lives in the repository. Use looks something like: use std use http const main = { var session, response session = std.try(http.mksession("some-hostname.com")) response = http.get("/index.html") for (key, val) in resp.hdrs std.put("{}: {}\n", key, val) ;; std.put("{}\n", body) http.freeresp(response) } API review would be welcome. Also, suggestions for what the server side of this should look like would be great. -- Ori Bernstein
- Next by Date: code review
- Next by thread: code review
- Index(es):