{"id":32385372,"url":"https://github.com/rockem/blink-java","last_synced_at":"2025-10-25T02:51:24.390Z","repository":{"id":10254978,"uuid":"64565647","full_name":"rockem/blink-java","owner":"rockem","description":"Simplified pure Java http server","archived":false,"fork":false,"pushed_at":"2022-05-20T20:49:38.000Z","size":214,"stargazers_count":11,"open_issues_count":10,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-16T13:54:12.780Z","etag":null,"topics":["http","java","pure","server","test"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rockem.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}},"created_at":"2016-07-30T21:56:08.000Z","updated_at":"2022-10-19T10:46:08.000Z","dependencies_parsed_at":"2022-08-25T09:10:38.955Z","dependency_job_id":null,"html_url":"https://github.com/rockem/blink-java","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/rockem/blink-java","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rockem%2Fblink-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rockem%2Fblink-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rockem%2Fblink-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rockem%2Fblink-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rockem","download_url":"https://codeload.github.com/rockem/blink-java/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rockem%2Fblink-java/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280897699,"owners_count":26409960,"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-25T02:00:06.499Z","response_time":81,"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","java","pure","server","test"],"created_at":"2025-10-25T02:51:10.193Z","updated_at":"2025-10-25T02:51:24.386Z","avatar_url":"https://github.com/rockem.png","language":"Java","readme":"# blink-java \n[![CircleCI](https://circleci.com/gh/rockem/blink-java.svg?style=svg)](https://circleci.com/gh/rockem/blink-java)\n\nblink is a simplified http server, made primarily for using in tests.\nIt has no dependencies other than those that come with Oracle's Jdk\nand it's inspired by Spark and Sinatra frameworks.\n\n## Dependency\n### Maven\n```xml\n\u003crepositories\u003e\n    \u003crepository\u003e\n      \u003cid\u003ejcenter\u003c/id\u003e\n      \u003curl\u003ehttps://jcenter.bintray.com/\u003c/url\u003e\n    \u003c/repository\u003e\n\u003c/repositories\u003e\n```\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eorg.rockem\u003c/groupId\u003e\n    \u003cartifactId\u003eblink-java\u003c/artifactId\u003e\n    \u003cversion\u003e0.5.3\u003c/version\u003e\n\u003c/dependency\u003e\n```\n### Gradle\n```groovy\nrepositories {\n    jcenter()\n}\n```\n```groovy\ndependencies {\n    compile 'org.rockem:blink-java:0.5.3'\n}\n```\n\n## Usage\n### Hello World\n#### Java\n```java\nnew BlinkServer(1234) {{\n\tget(\"/hello\", (req, res) -\u003e \"Hello World\");\n}};\n```\n#### Groovy\n```groovy\nnew BlinkServer(1234) {{\n\tget(\"/hello\", { req, res -\u003e \"Hello World\" })\n}}\n```\n### Path parameters\n```java\nnew BlinkServer(1234) {{\n\tdelete(\"/hello/{id}\", (req, res) -\u003e \"Delete \" + req.pathParam(\"id\"));\n}};\n```\n### Default content type\n```java\nnew BlinkServer(1234) {{\n    contentType(\"application/json\")\n    get(\"/hello\", (req, res) -\u003e \"{\\\"greeting\\\": \\\"Hello World\\\"}\");\n}};\n```\n### Request\n```java\nreq.body()                      // request body\nreq.param(\"name\")               // Query parameter\nreq.pathParam(\"name\")           // Path parameter\nreq.uri()                       // Request uri\nreq.header(\"name\")              // header value\nreq.cookie(\"name\")              // cookie value\n```\n### Response\n```java\nres.status(201)                 // set retrun status code\nres.header(\"name\", \"value\")     // Set header \nres.type(\"type\")                // Set content type\nres.cookie(\"name\", \"value\")     // Add/Update cookie\n```\n","funding_links":[],"categories":["Projects by main language"],"sub_categories":["Old Projects"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frockem%2Fblink-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frockem%2Fblink-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frockem%2Fblink-java/lists"}