{"id":21018100,"url":"https://github.com/amayaframework/sun-http-server","last_synced_at":"2025-10-14T21:38:50.690Z","repository":{"id":57732373,"uuid":"444148974","full_name":"AmayaFramework/sun-http-server","owner":"AmayaFramework","description":"A repackaged and refactored sun http server, created in the original form by Oracle and formerly embedded in the jdk. Distributed under the GNU v2 license.","archived":false,"fork":false,"pushed_at":"2025-06-17T18:54:01.000Z","size":196,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-14T21:38:50.074Z","etag":null,"topics":["http","http-server","https","https-server","java","java-8","java-library","java-nio","java-server","nonblocking-sockets","sun","sun-server"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AmayaFramework.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-01-03T17:42:21.000Z","updated_at":"2025-08-13T11:23:29.000Z","dependencies_parsed_at":"2024-11-19T10:27:50.269Z","dependency_job_id":"fded00d1-0d7d-4d8f-aada-83b86bc545d1","html_url":"https://github.com/AmayaFramework/sun-http-server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AmayaFramework/sun-http-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmayaFramework%2Fsun-http-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmayaFramework%2Fsun-http-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmayaFramework%2Fsun-http-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmayaFramework%2Fsun-http-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AmayaFramework","download_url":"https://codeload.github.com/AmayaFramework/sun-http-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmayaFramework%2Fsun-http-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279021376,"owners_count":26087023,"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-10-14T02:00:06.444Z","response_time":60,"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","https","https-server","java","java-8","java-library","java-nio","java-server","nonblocking-sockets","sun","sun-server"],"created_at":"2024-11-19T10:23:38.899Z","updated_at":"2025-10-14T21:38:50.685Z","avatar_url":"https://github.com/AmayaFramework.png","language":"Java","readme":"# sun-http-server [![maven-central](https://img.shields.io/maven-central/v/io.github.amayaframework/http-server?color=blue)](https://repo1.maven.org/maven2/io/github/amayaframework/http-server/)\n\nA repackaged and refactored sun http server, created in the original form by Oracle and formerly embedded in the jdk.\nDistributed under the GNU v2 license.\n\nThis server, built on non-blocking sockets, is a perfect lightweight solution that has everything you need\nfor full use in various projects. Up to this point, it was ignored by most of the community due to its location\nin sun packages. Now this restriction has been removed.\n\n## Getting Started\n\nTo install it, you will need:\n\n* Java 8+\n* SLF4J implementation (optional)\n* Maven/Gradle\n\n## Installing\n\n### Gradle dependency\n\n```Groovy\ndependencies {\n    implementation group: 'io.github.amayaframework', name: 'http-server', version: 'LATEST'\n}\n```\n\n### Maven dependency\n\n```\n\u003cdependency\u003e\n    \u003cgroupId\u003eio.github.amayaframework\u003c/groupId\u003e\n    \u003cartifactId\u003ehttp-server\u003c/artifactId\u003e\n    \u003cversion\u003eLATEST\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## Usage example\n\nThe code below will start the server associated with the address localhost:8000.\nThere will be one handler on the server responding to a route starting with /hello.\nThe response will contain code 200 and an empty body.\nHe will respond to all other requests with the code 404.\n\n```Java\npublic class Server {\n    public static void main(String[] args) throws IOException {\n        HttpServer server = Servers.httpServer(new InetSocketAddress(8000), 0);\n        server.createContext(\"/hello\", exchange -\u003e {\n            exchange.sendResponseHeaders(HttpCode.OK, 0);\n            exchange.close();\n        });\n        server.start();\n    }\n}\n```\n\n## Built With\n\n* [Gradle](https://gradle.org) - Dependency management\n* [slf4j](https://www.slf4j.org) - Logging facade\n\n## Authors\n\n* [Oracle Corporation](https://www.oracle.com) - *Main work*\n* [RomanQed](https://github.com/RomanQed) - *Repackaging and refactoring*\n\nSee also the list of [contributors](https://github.com/AmayaFramework/sun-http-server/contributors) who participated in\nthis project.\n\n## License\n\nThis project is licensed under the GNU GENERAL PUBLIC LICENSE Version 2 - see the [LICENSE](LICENSE) file for details\n\nAlso, according to the requirements, the original inserts of Oracle\nlicense headers are preserved in the original source files.\n\n## Acknowledgments\n\nThanks to all the sun developers who participated in the creation of this server.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famayaframework%2Fsun-http-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famayaframework%2Fsun-http-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famayaframework%2Fsun-http-server/lists"}