AtlatestRepositorysigil-http
sigil-http / treeREADME.md
1
# sigil-http3
HTTP/1.1 client and server library for [Sigil](https://codeberg.org/sigil/sigil).5
Provides HTTP/1.1 support for building web applications and APIs. Primary6
use cases are serving documentation sites and game server APIs.8
This package was extracted from the sigil monorepo — the in-tree history9
under `packages/sigil-http/` is preserved here as `master`.11
## Usage13
```scheme14
(import (sigil http))16
;; Client — GET / POST / PUT / DELETE17
(let ((response (http-get "https://example.com/")))18
(display (http-response-body response)))20
(http-post "https://api.example.com/users"21
"{\"name\":\"Alice\"}"22
'(("Content-Type" . "application/json")))24
;; Server25
(http-serve26
port: 808027
handler: (lambda (request)28
(http-response 200 '(("Content-Type" . "text/plain"))29
"Hello, world!")))30
```32
See `docs/http.md` for the full API reference, including streaming bodies,33
Server-Sent Events, and low-level request/response manipulation.35
## Dependencies37
- `sigil-stdlib`, `sigil-socket`, `sigil-tls` — pinned via `from-git`38
against the sigil monorepo (`^0.13.1`). Resolved automatically by39
`sigil deps install`.41
## Build43
```bash44
sigil deps install45
sigil build46
sigil test47
```49
## Development against a local sigil checkout51
`dev-redirects.sgl` redirects `codeberg:sigil/sigil` to `../sigil`. Pass52
it to the build CLI when you need to test against unreleased monorepo53
changes:55
```bash56
sigil build --redirects dev-redirects.sgl57
```59
Otherwise, let `sigil deps install` pull the pinned monorepo tag.61
## License63
BSD-3-Clause. See `package.sgl` for author list.