{"id":20418322,"url":"https://github.com/katsutedev/simplehttpserver","last_synced_at":"2025-07-06T15:03:06.794Z","repository":{"id":42861831,"uuid":"500651012","full_name":"KatsuteDev/simplehttpserver","owner":"KatsuteDev","description":"simplehttpserver5 - A simple and efficient HTTP server for Java","archived":false,"fork":false,"pushed_at":"2024-04-22T10:46:23.000Z","size":1948,"stargazers_count":5,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-22T11:55:15.532Z","etag":null,"topics":["http-server","http-server-handler","http-server-library","http-server-middleware","https-server","httpserver","java","lib","library","simplehttpserver","webserver","website"],"latest_commit_sha":null,"homepage":"https://katsute.dev/product/simplehttpserver5","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/KatsuteDev.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},"funding":{"custom":["katsute.dev"]}},"created_at":"2022-06-07T01:40:54.000Z","updated_at":"2024-03-31T14:25:51.000Z","dependencies_parsed_at":"2023-10-02T20:34:31.324Z","dependency_job_id":"eba5aa2f-e4d5-452e-875a-8c8aa3287064","html_url":"https://github.com/KatsuteDev/simplehttpserver","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KatsuteDev%2Fsimplehttpserver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KatsuteDev%2Fsimplehttpserver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KatsuteDev%2Fsimplehttpserver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KatsuteDev%2Fsimplehttpserver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KatsuteDev","download_url":"https://codeload.github.com/KatsuteDev/simplehttpserver/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248603501,"owners_count":21131807,"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","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","http-server-handler","http-server-library","http-server-middleware","https-server","httpserver","java","lib","library","simplehttpserver","webserver","website"],"created_at":"2024-11-15T06:31:35.667Z","updated_at":"2025-04-12T17:25:50.927Z","avatar_url":"https://github.com/KatsuteDev.png","language":"Java","readme":"\u003cdiv id=\"top\" align=\"center\"\u003e\n    \u003ca href=\"https://github.com/KatsuteDev/simplehttpserver\"\u003e\n        \u003cimg src=\"https://raw.githubusercontent.com/KatsuteDev/simplehttpserver/main/assets/icon.png\" alt=\"icon\" width=\"100\" height=\"100\"\u003e\n    \u003c/a\u003e\n    \u003ch3\u003eSimpleHttpServer\u003c/h3\u003e\n    \u003cstrong\u003eA simple and efficient HTTP server for Java\u003c/strong\u003e\n    \u003cdiv\u003e\n        \u003ca href=\"https://docs.katsute.dev/simplehttpserver\"\u003eDocumentation\u003c/a\u003e\n        \u003cbr\u003e\n        \u003ca href=\"https://mvnrepository.com/artifact/dev.katsute/simplehttpserver\"\u003eMaven Central\u003c/a\u003e\n        •\n        \u003ca href=\"https://github.com/KatsuteDev/simplehttpserver/packages/1569580\"\u003eGitHub Packages\u003c/a\u003e\n        •\n        \u003ca href=\"https://github.com/KatsuteDev/simplehttpserver/releases\"\u003eReleases\u003c/a\u003e\n    \u003c/div\u003e\n\u003c/div\u003e\n\n\u003cbr\u003e\n\n\u003e ⚠️ simplehttpserver5 is not compatible with any previous version of [simplehttpserver](https://github.com/Ktt-Development/simplehttpserver).\n\nSimplified httpserver experience for Java 8. Includes extensible servers and handlers for complex operations.\n\n## Installation\n\nThis library requires at least Java 8. No additional dependencies are required.\n\nCompiled binaries can be installed from:\n\n * [Maven Central](https://mvnrepository.com/artifact/dev.katsute/simplehttpserver)\n * [GitHub Packages](https://github.com/KatsuteDev/simplehttpserver/packages/1569580)\n * [Releases](https://github.com/KatsuteDev/simplehttpserver/releases)\n\nRefer to the [documentation](https://docs.katsute.dev/simplehttpserver) to learn how to use servers and handlers.\n\n\u003cdiv align=\"right\"\u003e\u003ca href=\"#top\"\u003e\u003ccode\u003e▲\u003c/code\u003e\u003c/a\u003e\u003c/div\u003e\n\n## Features\n\n### Complicated tasks made easy\n\nSimplified exchange methods for:\n\n * Parsing `GET`/`POST` requests, including `multipart/form-data` support.\n * Accessing cookies.\n * Sending byte arrays, strings, and files to clients.\n * Sending gzip compressed responses.\n\n```java\nSimpleHttpHandler handler = new SimpleHttpHandler(){\n    @Override\n    public void handle(SimpleHttpExchange exchange){\n        Map POST = exchange.getPostMap();\n        MultipartFormData form = exchange.getMultipartFormData();\n        Record record = form.getRecord(\"record\");\n        FileRecord file = form.getRecord(\"file\").asFile();\n        exchange.send(new File(\"OK.png\"), true);\n    }\n};\n```\n\n### More Features\n\nFeatures not included with a regular HTTP server:\n\n * Cookies\n * Sessions\n * Multithreaded Servers\n\n```java\nSimpleHttpServer server = new SimpleHttpServer(8080);\nserver.setHttpSessionHandler(new HttpSessionHandler());\nSimpleHttpHandler handler = new SimpleHttpHandler(){\n    @Override\n    public void handle(SimpleHttpExchange exchange){\n        HttpSession session = server.getHttpSession(exchange);\n        String session_id = session.getSessionID();\n        Map\u003cString,String\u003e cookies = exchange.getCookies();\n        exchange.close();\n    }\n};\n```\n\n### Simplified Handlers\n\nSimple and extensible request handlers:\n\n * Redirect Handler\n * Predicate Handler\n * Root `/` Handler\n * File Handler\n * Server-Sent-Events (SSE) Handler\n * Temporary Handler\n * Timeout Handler\n * Throttled Handler\n\n```java\nRedirectHandler redirect = new RedirectHandler(\"https://github.com/\");\nFileHandler fileHandler = new FileHandler();\nfileHandler.addFile(new File(\"index.html\"));\nfileHandler.addDirectory(new File(\"/site\"));\nSSEHandler SSE = new SSEHandler();\nSSE.push(\"Server sent events!\");\nThrottledHandler throttled = new ThrottledHandler(new ServerExchangeThrottler(), new HttpHandler());\n```\n\n\u003cdiv align=\"right\"\u003e\u003ca href=\"#top\"\u003e\u003ccode\u003e▲\u003c/code\u003e\u003c/a\u003e\u003c/div\u003e\n\n## Contributing\n\n#### Running Tests Locally\n\nFor local tests you can use Java 8+, however only methods in the Java 8 API may be used. The `src/main/java9` folder should not be marked as a source root.\n\n#### Running Tests using GitHub Actions\n\nEach commit automatically triggers the Java CI workflow, make sure you have actions enabled on your forks.\n\n\u003cdiv align=\"right\"\u003e\u003ca href=\"#top\"\u003e\u003ccode\u003e▲\u003c/code\u003e\u003c/a\u003e\u003c/div\u003e\n\n## \u0026nbsp;\n\nThis library is released under the [GNU General Public License (GPL) v2.0](https://github.com/KatsuteDev/simplehttpserver/blob/main/LICENSE).","funding_links":["katsute.dev"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkatsutedev%2Fsimplehttpserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkatsutedev%2Fsimplehttpserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkatsutedev%2Fsimplehttpserver/lists"}