{"id":47281996,"url":"https://github.com/ponylang/stallion","last_synced_at":"2026-04-12T02:03:04.347Z","repository":{"id":338702775,"uuid":"1158745911","full_name":"ponylang/stallion","owner":"ponylang","description":"An HTTP server for Pony","archived":false,"fork":false,"pushed_at":"2026-03-28T02:50:48.000Z","size":346,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-04-02T06:42:55.472Z","etag":null,"topics":["http","http-server","pony-core-team-library","ponylang","ponylang-langauge"],"latest_commit_sha":null,"homepage":"https://ponylang.github.io/stallion","language":"Pony","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ponylang.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"open_collective":"ponyc"}},"created_at":"2026-02-15T21:12:37.000Z","updated_at":"2026-03-28T02:50:50.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ponylang/stallion","commit_stats":null,"previous_names":["ponylang/lori_http_server","ponylang/stallion"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/ponylang/stallion","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ponylang%2Fstallion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ponylang%2Fstallion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ponylang%2Fstallion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ponylang%2Fstallion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ponylang","download_url":"https://codeload.github.com/ponylang/stallion/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ponylang%2Fstallion/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31701642,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-11T21:17:31.016Z","status":"online","status_checked_at":"2026-04-12T02:00:06.763Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["http","http-server","pony-core-team-library","ponylang","ponylang-langauge"],"created_at":"2026-03-16T01:54:35.884Z","updated_at":"2026-04-12T02:03:04.341Z","avatar_url":"https://github.com/ponylang.png","language":"Pony","funding_links":["https://opencollective.com/ponyc"],"categories":[],"sub_categories":[],"readme":"# stallion\n\nAn HTTP server for Pony, built on [lori](https://github.com/ponylang/lori). Your actor IS the connection — no hidden internal actors, no notify objects. Responses are built with `ResponseBuilder` for complete responses, or streamed with flow-controlled chunked transfer encoding.\n\n## Status\n\nstallion is beta quality software that will change frequently. Expect breaking changes. That said, you should feel comfortable using it in your projects.\n\n## Installation\n\n* Requires ponyc 0.63.1 or later\n* Install [corral](https://github.com/ponylang/corral)\n* `corral add github.com/ponylang/stallion.git --version 0.6.0`\n* `corral fetch` to fetch your dependencies\n* `use \"stallion\"` to include this package\n* `corral run -- ponyc` to compile your application\n\nYou'll also need a SSL library installed on your platform. See the [net-ssl](https://github.com/ponylang/net-ssl) installation instructions for details.\n\n## Usage\n\nA stallion server has two actor types: a listener and one or more connection actors. The listener implements `lori.TCPListenerActor` and creates connection actors in `_on_accept`. Each connection actor implements `stallion.HTTPServerActor`, owns a `stallion.HTTPServer`, and overrides callbacks to handle requests:\n\n```pony\nuse stallion = \"stallion\"\nuse lori = \"lori\"\n\nactor Main\n  new create(env: Env) =\u003e\n    let auth = lori.TCPListenAuth(env.root)\n    MyListener(auth, \"localhost\", \"8080\")\n\nactor MyListener is lori.TCPListenerActor\n  var _tcp_listener: lori.TCPListener = lori.TCPListener.none()\n  let _server_auth: lori.TCPServerAuth\n  let _config: stallion.ServerConfig\n\n  new create(auth: lori.TCPListenAuth, host: String, port: String) =\u003e\n    _server_auth = lori.TCPServerAuth(auth)\n    _config = stallion.ServerConfig(host, port)\n    _tcp_listener = lori.TCPListener(auth, host, port, this)\n\n  fun ref _listener(): lori.TCPListener =\u003e _tcp_listener\n\n  fun ref _on_accept(fd: U32): lori.TCPConnectionActor =\u003e\n    MyServer(_server_auth, fd, _config)\n\nactor MyServer is stallion.HTTPServerActor\n  var _http: stallion.HTTPServer = stallion.HTTPServer.none()\n\n  new create(auth: lori.TCPServerAuth, fd: U32,\n    config: stallion.ServerConfig)\n  =\u003e\n    _http = stallion.HTTPServer(auth, fd, this, config)\n\n  fun ref _http_connection(): stallion.HTTPServer =\u003e _http\n\n  fun ref on_request_complete(request': stallion.Request val,\n    responder: stallion.Responder)\n  =\u003e\n    let body: String val = \"Hello!\"\n    let response = stallion.ResponseBuilder(stallion.StatusOK)\n      .add_header(\"Content-Length\", body.size().string())\n      .finish_headers()\n      .add_chunk(body)\n      .build()\n    responder.respond(response)\n```\n\nFor streaming responses, use chunked transfer encoding with flow-controlled delivery via `on_chunk_sent()` callbacks. For HTTPS, use `stallion.HTTPServer.ssl` instead of `stallion.HTTPServer`. See the [examples](examples/) for complete working programs demonstrating query parameter extraction, SSL/TLS, and streaming.\n\n## API Documentation\n\n[https://ponylang.github.io/stallion](https://ponylang.github.io/stallion)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fponylang%2Fstallion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fponylang%2Fstallion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fponylang%2Fstallion/lists"}