{
  "id": 18644390,
  "title": "Exploring Janet and the httpf web framework",
  "url": "https://urgent.news/2026/11/07/exploring-janet-and-the-httpf-web-framework",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-07T04:28:11.000Z",
  "source": {
    "name": "Lobsters",
    "slug": "lobsters",
    "url": "https://nick.gs/blog/2026-11/exploring-janet-and-the-httpf-web-framework/"
  },
  "original_language": "en",
  "account": "Janet is a programming language that the author finds appealing, despite their previous struggles with Lisp and Scheme. This language comes with a decent standard library, including a module called httpf which functions as a minimal web framework. The author decided to create a server using this framework to better understand how it works. They started by making a server object and defining functions with the :path metadata, which the server later uses to locate these functions.\n\nThe HTTPF system then searches for functions with :path metadata when the add-bindgins-as-routes function is called. The choice to use tags to define the Content-Type is not something the user can decide on their own. This leads to the need to return a hiccup-style data structure that will be processed by spork/htmlgen, rather than allowing the user to build the HTML themselves or use a different template system. The HTTP response code is set through the setdyn call, making it seem like setting a global variable.\n\nThe route functions take two parameters: request and post-data. The request is a general HTTP Request object, while post-data is nil unless the user sent a POST request, in which case it is decoded into a Janet table. The :render-mime can be set to application/json to easily transform any basic Janet data structures into JSON. However, HTTPF is basic and has significant limitations. The author points out that while it covers common web framework parts, it's not something you can rely on for beyond basic usage.\n\nOther options in the Janet ecosystem include Circlet, which is licensed under the GNU GPL, and Joy, which is more full-featured but has issues with setting cookies. Overall, the HTTPF system is a good starting point for building a web application in Janet, but it's not an ideal solution for more complex applications.",
  "summary": null,
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}