{"id":13338136,"url":"https://github.com/toitlang/pkg-http","last_synced_at":"2026-04-06T19:01:54.923Z","repository":{"id":37797684,"uuid":"433879224","full_name":"toitlang/pkg-http","owner":"toitlang","description":"Package: Implement your REST server or client in Toit and run it on your ESP32.","archived":false,"fork":false,"pushed_at":"2025-08-22T15:13:14.000Z","size":310,"stargazers_count":1,"open_issues_count":5,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-08-22T16:39:44.015Z","etag":null,"topics":["esp32","toit"],"latest_commit_sha":null,"homepage":"","language":"Toit","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/toitlang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"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}},"created_at":"2021-12-01T15:21:58.000Z","updated_at":"2025-08-22T14:20:20.000Z","dependencies_parsed_at":"2024-04-22T12:26:04.046Z","dependency_job_id":"39cb4ff6-d1a6-4d87-8eb1-da9496d0fafa","html_url":"https://github.com/toitlang/pkg-http","commit_stats":null,"previous_names":[],"tags_count":40,"template":false,"template_full_name":null,"purl":"pkg:github/toitlang/pkg-http","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toitlang%2Fpkg-http","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toitlang%2Fpkg-http/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toitlang%2Fpkg-http/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toitlang%2Fpkg-http/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/toitlang","download_url":"https://codeload.github.com/toitlang/pkg-http/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toitlang%2Fpkg-http/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31485516,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-06T17:22:55.647Z","status":"ssl_error","status_checked_at":"2026-04-06T17:22:54.741Z","response_time":112,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["esp32","toit"],"created_at":"2024-07-29T19:15:31.722Z","updated_at":"2026-04-06T19:01:54.904Z","avatar_url":"https://github.com/toitlang.png","language":"Toit","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Toit package: http\n\nAn HTTP server and client.\n\nThis package implements the HTTP/1.1 protocol. It supports 'GET' and 'POST'\nrequests with convenience methods, and can be used to implement REST servers.\n\nIt has support for HTTPS connections. See the 'tls' examples for details.\n\n## Examples\n\n### Get request\n\n```\nimport http\nimport net\n\nmain:\n  network := net.open\n  client := http.Client network\n\n  response := client.get \"www.example.com\" \"/\"\n  data := #[]\n  while chunk := response.body.read:\n    data += chunk\n  print data.to_string\n\n  client.close\n```\n\n### JSON Post request\n\nThis example encodes the data to the server with JSON and then decodes\nthe response as JSON as well.\n```\nimport http\nimport net\nimport encoding.json\n\nURL ::= \"httpbin.org\"\nPATH ::= \"/post\"\n\nmain:\n  network := net.open\n  client := http.Client network\n  response := client.post_json --host=URL --path=PATH {\n    \"foo\": 42,\n    \"bar\": 499,\n  }\n  data := json.decode_stream response.body\n  client.close\n  print data\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoitlang%2Fpkg-http","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftoitlang%2Fpkg-http","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoitlang%2Fpkg-http/lists"}