{"id":20713110,"url":"https://github.com/malaksadek/simple-http-server","last_synced_at":"2025-12-12T11:40:56.313Z","repository":{"id":256207456,"uuid":"264031132","full_name":"MalakSadek/Simple-HTTP-Server","owner":"MalakSadek","description":"A simple HTTP server in Java 🌐 📂 (2019)","archived":false,"fork":false,"pushed_at":"2021-03-25T16:16:59.000Z","size":148,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-17T21:29:43.918Z","etag":null,"topics":["http","http-client","http-server","java","network","network-programming","networking"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MalakSadek.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2020-05-14T21:40:04.000Z","updated_at":"2021-03-25T16:17:02.000Z","dependencies_parsed_at":"2024-09-09T16:11:53.860Z","dependency_job_id":"9e9b5a23-fccd-4437-95ea-3c4ee1f494bd","html_url":"https://github.com/MalakSadek/Simple-HTTP-Server","commit_stats":null,"previous_names":["malaksadek/simple-http-server"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MalakSadek%2FSimple-HTTP-Server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MalakSadek%2FSimple-HTTP-Server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MalakSadek%2FSimple-HTTP-Server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MalakSadek%2FSimple-HTTP-Server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MalakSadek","download_url":"https://codeload.github.com/MalakSadek/Simple-HTTP-Server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242988012,"owners_count":20217534,"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","http-client","http-server","java","network","network-programming","networking"],"created_at":"2024-11-17T02:23:32.941Z","updated_at":"2025-12-12T11:40:51.279Z","avatar_url":"https://github.com/MalakSadek.png","language":"Java","readme":"# Simple-HTTP-Server\n\nA simple HTTP server in Java 🌐 📂 (2019).\n\nThis is an HTTP server implemented in Java. It supports HTTP GET, HEAD, PUT, POST, and DELETE requests from multiple clients through threading, and responses appropriately to connecting clients using the 200 OK, 204 No Content, 404 Not Found and 501 Not Implemented codes. It also supports text files such as text/html and binary images such as `images/jpg`, `images/jpeg`, `images/png` and `images/gif`. The server logs every request to a .txt file.\n\n### Installation\n\nClone the project: \n            `git clone https://github.com/MalakSadek/Simple-HTTP-Server`\n\nCd into the directory and compile the files, then run the source code:\n\n            cd Java-Web-Server-HTTP-Requests\n            javac src/*.java src/exception/*.java\n\n## Usage\n\n### Server\n\nRun the server:\n\n            cd src/\n            java WebServerMain \u003cdocument_root\u003e \u003cport_number\u003e \u003cmax_number_of_active_threads\u003e\n\nwhere:\n\n* document_root is the root directory from which the server will serve documents.\n* port_number is the port on which the server will listen.\n* \u003cmax_number_of_active_threads\u003e is the maximum number of clients that can connect simultaneously to the server.\n\nExample: `java WebServerMain ../www 12345 100`\n\nA testing web root directory with html and binary image files is provided in the www directory.\n\n    Terminal\n        GET request method\n            headers: curl -s -I -X GET localhost:12345/index.html\n            text content: curl -s -X GET localhost:12345/index.html\n        DELETE request method\n            headers: curl -s -I -X DELETE localhost:12345/delete_me.txt\n            content: curl -s -X DELETE localhost:12345/delete_me.txt\n        404 Error: curl -s -X GET localhost:12345/test.html (File not found)\n        501 Error: curl -X SLURP localhost:12345/index.html (POST not implemented)\n    Web browser\n        Default page (GET): open http://127.0.0.1:12345/\n        Binary image content: open http://127.0.0.1:12345/stars.gif\n\n# Javadocs\n\n    1. Generate the Javadocs: javadoc -d javadoc src/*.java src/exception/*.java\n\n    2. Open javadoc/index.html in your web browser.\n    \n    \n# Contact\n\n* email: mfzs1@st-andrews.ac.uk\n* LinkedIn: www.linkedin.com/in/malak-sadek-17aa65164/\n* website: http://malaksadekapps.com/\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalaksadek%2Fsimple-http-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmalaksadek%2Fsimple-http-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalaksadek%2Fsimple-http-server/lists"}