{"id":29014835,"url":"https://github.com/arteam/embedded-http-server","last_synced_at":"2025-06-25T20:30:31.899Z","repository":{"id":12404162,"uuid":"60505350","full_name":"arteam/embedded-http-server","owner":"arteam","description":"A light and minimalistic HTTP server for Java with zero dependencies and quick startup time","archived":false,"fork":false,"pushed_at":"2025-05-13T10:30:21.000Z","size":176,"stargazers_count":18,"open_issues_count":2,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-13T11:33:43.062Z","etag":null,"topics":["http","java","unit-testing"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":false,"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/arteam.png","metadata":{"files":{"readme":"readme.adoc","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,"zenodo":null}},"created_at":"2016-06-06T06:53:45.000Z","updated_at":"2025-05-13T10:30:19.000Z","dependencies_parsed_at":"2023-11-12T16:27:54.581Z","dependency_job_id":"c9b16b1b-055c-44be-ba17-3310c10739b7","html_url":"https://github.com/arteam/embedded-http-server","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/arteam/embedded-http-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arteam%2Fembedded-http-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arteam%2Fembedded-http-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arteam%2Fembedded-http-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arteam%2Fembedded-http-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arteam","download_url":"https://codeload.github.com/arteam/embedded-http-server/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arteam%2Fembedded-http-server/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261948694,"owners_count":23234878,"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","java","unit-testing"],"created_at":"2025-06-25T20:30:28.218Z","updated_at":"2025-06-25T20:30:31.879Z","avatar_url":"https://github.com/arteam.png","language":"Java","readme":"# Embedded HTTP server\n\n`embedded-http-server` is a light and minimalistic Java HTTP server with zero dependencies\nand quick startup time.\n\n## Maven\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.arteam\u003c/groupId\u003e\n    \u003cartifactId\u003eembedded-http-server\u003c/artifactId\u003e\n    \u003cversion\u003e1.2\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## Description\n\n`embedded-http-server` is a thin wrapper around `com.sun.net.HttpServer`. The internal Sun server is\nquite fast, provides a Java API for accessing requests/responses and already shipped in\nthe JDK. Unfortunately, the API is quite confusing, not documented and the server lacks\nerror reporting. This library tries to solve these issues by providing a nice and functional\nAPI for scripting an HTTP server without a long startup time.\n\n## Application\n\nThe primary use case is integration testing of HTTP clients. You often need to fire up an\nHTTP server in tests to create a test double for a remote HTTP server. That test double should\nideally be rather fast, otherwise you lose the advantage of the quick turnaround time and\neventually switch to testing on a \"live\" system. Some people are also opionated about\nincluding huge projects as external dependencies without a specific need and want to avoid \nbloating the classpath.\n\n## Advantages\n\nThe project is not tied to any external API and can be used with any HTTP client or framework.\nYou can use it with any HTTP client you like: \n\n* https://openjdk.java.net/groups/net/httpclient/intro.html[Java11 HTTP Client]\n* https://hc.apache.org/[Apache HTTP Client],\n* https://github.com/square/okhttp[OkHTTP],\n* https://jersey.java.net/documentation/latest/client.html[Jersey HTTP Client],\n* http://docs.spring.io/spring/docs/4.0.x/javadoc-api/org/springframework/web/client/RestTemplate.html[Spring Rest Template],\n* or even with http://docs.oracle.com/javase/8/docs/api/java/net/URLConnection.html[URLConnection].\n\n## Alternatives\n\nIf you need a real HTTP server for serving a production worload, you should definitely take a look at\n\n* http://www.eclipse.org/jetty/[Jetty], \n* https://tomcat.apache.org/[Tomcat], \n* http://undertow.io/[Undertow],\n* or http://netty.io/[Netty].\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farteam%2Fembedded-http-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farteam%2Fembedded-http-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farteam%2Fembedded-http-server/lists"}