// This file is generated by generate-std.joke script. Do not edit manually!

package http

import (
	"fmt"
	. "github.com/candid82/joker/core"
	"os"
)

func InternsOrThunks() {
	if VerbosityLevel > 0 {
		fmt.Fprintln(os.Stderr, "Lazily running slow version of http.InternsOrThunks().")
	}
	httpNamespace.ResetMeta(MakeMeta(nil, `Provides HTTP client and server implementations.`, "1.0"))

	httpNamespace.InternVar("send", send_,
		MakeMeta(
			NewListFrom(NewVectorFrom(MakeSymbol("request"))),
			`Sends an HTTP request and returns an HTTP response.
  request is a map with the following keys:
  - url (string)
  - method (string, keyword or symbol, defaults to :get)
  - body (string)
  - host (string, overrides Host header if provided)
  - headers (map).
  All keys except for url are optional.
  response is a map with the following keys:
  - status (int)
  - body (string)
  - headers (map)
  - content-length (int)`, "1.0"))

	httpNamespace.InternVar("start-file-server", start_file_server_,
		MakeMeta(
			NewListFrom(NewVectorFrom(MakeSymbol("addr"), MakeSymbol("root"))),
			`Starts HTTP server on the TCP network address addr that
  serves HTTP requests with the contents of the file system rooted at root.`, "1.0"))

	httpNamespace.InternVar("start-server", start_server_,
		MakeMeta(
			NewListFrom(NewVectorFrom(MakeSymbol("addr"), MakeSymbol("handler"))),
			`Starts HTTP server on the TCP network address addr.
  handler receives a request map and returns a response map.
  A response map with an :sse channel streams Server-Sent Events
  until the channel closes or the client disconnects. Values read from
  the channel may be strings, which are sent as data events, or maps with
  any of the following keys:
  - data (string)
  - event (string)
  - id (string)
  - retry (int)
  - comment (string)
  Optional status and headers keys are applied before streaming. If the
  response contains an on-close fn, it is called with a map after
  streaming ends. The map contains a reason key with one of
  :channel-closed, :client-closed, :write-error or :error. For
  :write-error and :error, the map also contains an error key with an
  Error object. SSE responses default to Content-Type text/event-stream,
  Cache-Control no-cache and Connection keep-alive unless those headers
  are provided.`, "1.0"))

}
