http
Resurrecting an old post about how I write HTTP clients in Go since I am doing this again for the 89432894023 time.
https://blainsmith.com/articles/how-i-write-http-clients/
#GoLang #HTTP
https://blainsmith.com/articles/how-i-write-http-clients/
#GoLang #HTTP
Edited 27d ago
I have working handler functions for the hare-http library that work with the standard http::response_writer and http::request that needs no context of an actual server. There's a...
That you can use with http::serve() and you can create handlers with basic functions, a route mux, and middleware chains that lets you build complex routing paths and middlewares. I just need to add support for path placeholder values for the mux.
#HareLang #HTTP
http::handle(h: *http::handler, wr: *http::response_writer, r: *http::request) void
That you can use with http::serve() and you can create handlers with basic functions, a route mux, and middleware chains that lets you build complex routing paths and middlewares. I just need to add support for path placeholder values for the mux.
#HareLang #HTTP
Edited 14d ago
I have working handler functions for the hare-http library that works with the standard http::response_writer and http::request that needs no context of an actual server.
Library: https://git.sr.ht/~blainsmith/hare-http/commit/dea3461485f86d302694a104cc117920eec43d7e
That you can use with http::serve() and you can create handlers with basic functions, a route mux, and middleware chains that lets you build complex routing paths and middlewares. I just need to add support for path placeholder values for the mux.
Simple Example: https://git.sr.ht/~blainsmith/hare-http/commit/0d0f2bc4a7871274f5195025811f7b56457a91aa
Custom Handler: https://git.sr.ht/~blainsmith/hare-http/commit/e16aeb5a4b2ca2c436c46af61c02bcbc5695042c
I will probably send a patch at some point and offer to maintain it. I've been interested in becoming a maintainer on this for a while, so maybe it is time to inquire.
#HareLang #HTTP
Library: https://git.sr.ht/~blainsmith/hare-http/commit/dea3461485f86d302694a104cc117920eec43d7e
That you can use with http::serve() and you can create handlers with basic functions, a route mux, and middleware chains that lets you build complex routing paths and middlewares. I just need to add support for path placeholder values for the mux.
Simple Example: https://git.sr.ht/~blainsmith/hare-http/commit/0d0f2bc4a7871274f5195025811f7b56457a91aa
Custom Handler: https://git.sr.ht/~blainsmith/hare-http/commit/e16aeb5a4b2ca2c436c46af61c02bcbc5695042c
I will probably send a patch at some point and offer to maintain it. I've been interested in becoming a maintainer on this for a while, so maybe it is time to inquire.
#HareLang #HTTP
Edited 14d ago