{"id":1972,"url":"https://github.com/httpswift/swifter","last_synced_at":"2025-12-17T19:04:10.713Z","repository":{"id":17734680,"uuid":"20571593","full_name":"httpswift/swifter","owner":"httpswift","description":"Tiny http server engine written in Swift programming language.","archived":false,"fork":false,"pushed_at":"2024-03-17T20:32:47.000Z","size":11615,"stargazers_count":4002,"open_issues_count":120,"forks_count":555,"subscribers_count":98,"default_branch":"stable","last_synced_at":"2025-12-14T11:55:49.222Z","etag":null,"topics":["http","server","swift","web"],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/httpswift.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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}},"created_at":"2014-06-06T17:07:31.000Z","updated_at":"2025-12-10T08:12:09.000Z","dependencies_parsed_at":"2024-01-05T20:18:41.037Z","dependency_job_id":"57e82c84-aa65-4e16-8101-a9288709412d","html_url":"https://github.com/httpswift/swifter","commit_stats":{"total_commits":489,"total_committers":105,"mean_commits":"4.6571428571428575","dds":0.6380368098159509,"last_synced_commit":"1e4f51c92d7ca486242d8bf0722b99de2c3531aa"},"previous_names":["glock45/swifter"],"tags_count":29,"template":false,"template_full_name":null,"purl":"pkg:github/httpswift/swifter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/httpswift%2Fswifter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/httpswift%2Fswifter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/httpswift%2Fswifter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/httpswift%2Fswifter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/httpswift","download_url":"https://codeload.github.com/httpswift/swifter/tar.gz/refs/heads/stable","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/httpswift%2Fswifter/sbom","scorecard":{"id":471292,"data":{"date":"2025-08-11","repo":{"name":"github.com/httpswift/swifter","commit":"1e4f51c92d7ca486242d8bf0722b99de2c3531aa"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.3,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":8,"reason":"Found 9/11 approved changesets -- score normalized to 8","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/danger.yml:1","Warn: no topLevel permission defined: .github/workflows/linux-tests.yml:1","Warn: no topLevel permission defined: .github/workflows/macos-tests.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/danger.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/httpswift/swifter/danger.yml/stable?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/danger.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/httpswift/swifter/danger.yml/stable?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/linux-tests.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/httpswift/swifter/linux-tests.yml/stable?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/macos-tests.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/httpswift/swifter/macos-tests.yml/stable?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/macos-tests.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/httpswift/swifter/macos-tests.yml/stable?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/macos-tests.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/httpswift/swifter/macos-tests.yml/stable?enable=pin","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: BSD 3-Clause \"New\" or \"Revised\" License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'stable'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":1,"reason":"9 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-69p6-wvmq-27gg","Warn: Project is vulnerable to: GHSA-pfpr-3463-c6jh","Warn: Project is vulnerable to: GHSA-pphf-gfrm-v32r","Warn: Project is vulnerable to: GHSA-2rxp-v6pw-ch6m","Warn: Project is vulnerable to: GHSA-4xqq-m2hx-25v8","Warn: Project is vulnerable to: GHSA-5866-49gr-22v4","Warn: Project is vulnerable to: GHSA-r55c-59qm-vjw6","Warn: Project is vulnerable to: GHSA-vg3r-rm7w-2xgh","Warn: Project is vulnerable to: GHSA-vmwr-mc7x-5vc3"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-19T13:56:54.711Z","repository_id":17734680,"created_at":"2025-08-19T13:56:54.711Z","updated_at":"2025-08-19T13:56:54.711Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27766806,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-16T02:00:10.477Z","response_time":57,"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","server","swift","web"],"created_at":"2024-01-05T20:16:00.236Z","updated_at":"2025-12-17T19:04:10.682Z","avatar_url":"https://github.com/httpswift.png","language":"Swift","readme":"![Platform](https://img.shields.io/badge/Platform-Linux%20\u0026%20OSX%20\u0026%20tvOS-4BC51D.svg?style=flat)\n![Swift](https://img.shields.io/badge/Swift-4.x,_5.0-4BC51D.svg?style=flat)\n![Protocols](https://img.shields.io/badge/Protocols-HTTP%201.1%20\u0026%20WebSockets-4BC51D.svg?style=flat)\n[![CocoaPods](https://img.shields.io/cocoapods/v/Swifter.svg?style=flat)](https://cocoapods.org/pods/Swifter)\n[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n\n### What is Swifter?\n\nTiny http server engine written in [Swift](https://developer.apple.com/swift/) programming language.\n\n### Branches\n`* stable` - lands on CocoaPods and others. Supports the latest non-beta Xcode and SPM. Stable.\n\n`* master` - stable branch plus experimental web-framework layer.\n\n`* 2.0   ` - next version of Swifter (async IO). Experimental.\n\n\n### How to start?\n```swift\nlet server = HttpServer()\nserver[\"/hello\"] = { .ok(.htmlBody(\"You asked for \\($0)\"))  }\nserver.start()\n```\n\n### How to load HTML by string?\n```swift\nlet server = HttpServer()\nserver[path] = { request in\n    return HttpResponse.ok(.text(\"\u003chtml string\u003e\"))\n}\nserver.start()\n```\n\n### How to share files?\n```swift\nlet server = HttpServer()\nserver[\"/desktop/:path\"] = shareFilesFromDirectory(\"/Users/me/Desktop\")\nserver.start()\n```\n### How to redirect?\n```swift\nlet server = HttpServer()\nserver[\"/redirect\"] = { request in\n  return .movedPermanently(\"http://www.google.com\")\n}\nserver.start()\n```\n### How to HTML ?\n```swift\nlet server = HttpServer()\nserver[\"/my_html\"] = scopes { \n  html {\n    body {\n      h1 { inner = \"hello\" }\n    }\n  }\n}\nserver.start()\n```\n### How to WebSockets ?\n```swift\nlet server = HttpServer()\nserver[\"/websocket-echo\"] = websocket(text: { session, text in\n  session.writeText(text)\n}, binary: { session, binary in\n  session.writeBinary(binary)\n})\nserver.start()\n```\n### CocoaPods? Yes.\n```ruby\nuse_frameworks!\n\npod 'Swifter', '~\u003e 1.5.0'\n```\n\n### Carthage? Also yes.\n```\ngithub \"httpswift/swifter\" ~\u003e 1.5.0\n```\n\n### Swift Package Manager.\n```swift\nimport PackageDescription\n\nlet package = Package(\n    name: \"MyServer\",\n    dependencies: [\n        .package(url: \"https://github.com/httpswift/swifter.git\", .upToNextMajor(from: \"1.5.0\"))\n    ]\n)\n```\n\n### Docker.\n```\ndocker run -d -p 9080:9080 -v `pwd`:/Swifter -w /Swifter --name Swifter swift bash -c \"swift run\"\n```\n\n","funding_links":[],"categories":["Server","Libs","Swift","HarmonyOS","Network [🔝](#readme)"],"sub_categories":["Keychain","Network","Other free courses","Windows Manager"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhttpswift%2Fswifter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhttpswift%2Fswifter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhttpswift%2Fswifter/lists"}