{"id":31733283,"url":"https://github.com/losizm/scurry","last_synced_at":"2026-04-17T06:32:21.388Z","repository":{"id":286246774,"uuid":"708952187","full_name":"losizm/scurry","owner":"losizm","description":"The Groovy-esque wrapper for Scamper","archived":false,"fork":false,"pushed_at":"2025-04-05T09:22:21.000Z","size":2739,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-09T08:23:18.759Z","etag":null,"topics":["groovy","http","scamper"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":false,"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/losizm.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":"2023-10-23T18:02:44.000Z","updated_at":"2025-04-05T06:53:44.000Z","dependencies_parsed_at":"2025-04-05T08:25:30.430Z","dependency_job_id":"a1219477-1646-43dc-be33-98e9c06dc3a8","html_url":"https://github.com/losizm/scurry","commit_stats":null,"previous_names":["losizm/scurry"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/losizm/scurry","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/losizm%2Fscurry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/losizm%2Fscurry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/losizm%2Fscurry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/losizm%2Fscurry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/losizm","download_url":"https://codeload.github.com/losizm/scurry/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/losizm%2Fscurry/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31918479,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"online","status_checked_at":"2026-04-17T02:00:06.879Z","response_time":62,"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":["groovy","http","scamper"],"created_at":"2025-10-09T08:23:15.626Z","updated_at":"2026-04-17T06:32:21.361Z","avatar_url":"https://github.com/losizm.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Scurry\n\n[![Maven Central](https://img.shields.io/maven-central/v/com.github.losizm/scurry_3.svg?label=Maven%20Central)](https://central.sonatype.com/search?q=g:com.github.losizm%20a:scurry_3)\n\nThe Groovy-_esque_ wrapper for [Scamper](https://github.com/losizm/scamper).\n\nAlthough there are no references to Groovy in codebase, this library is intended\nfor Groovy developers. It defines an interface to Scamper using a mixture of\nstatic and dynamic typing to provide a fluid programming experience.\n\n## Getting Started\n\nTo get started, add **Scurry** to your sbt project:\n\n```scala\nlibraryDependencies += \"com.github.losizm\" %% \"scurry\" % \"1.0.0\"\n```\n\nYou'll need **Scamper** as well:\n\n```scala\nlibraryDependencies += \"com.github.losizm\" %% \"scamper\" % \"42.0.0\"\n```\n\n### HTTP Server\n\nHere's an example Groovy script to run an HTTP server:\n\n```groovy\nimport scurry.http.HttpServer\nimport scurry.http.response.BadRequest\nimport scurry.http.response.Ok\n\n// Define utility to log HTTP messages\ndef logHttpMessage(msg) {\n  println \"[server] ${msg.startLine}\"\n  msg.headers.each { println \"[server] $it\" }\n  println ''\n  msg\n}\n\n// Create HTTP server\ndef server = new HttpServer(host: 'localhost', port: 8080)\n\n// At this point, the server hasn't been started.\n// You'll want to add some endpoints first.\n\n// Log incoming requests\nserver.incoming { logHttpMessage(it) }\n\n// Handle GET requests\nserver.get('/greet') { req -\u003e\n  def name = req.query.name\n  if (name == null) new Ok(body: 'Hello, stranger!')\n  else              new Ok(body: \"Hello, $name!\")\n}\n\n// Handle POST requests\nserver.post('/echo') { req -\u003e\n  def message = req.body.toString(8192)\n  if (message == '') new BadRequest(body: 'No message.')\n  else               new Ok(body: message)\n}\n\n// Log outgoing responses\nserver.outgoing { logHttpMessage(it) }\n\nThread.start {\n  try {\n    // Run server for 30 seconds\n    server.start()\n    sleep(30000)\n  }\n  finally {\n    server.stop()\n  }\n}\n```\n\n### HTTP Client\n\nIn this Groovy script example, the HTTP client talks to the server created in\nprevious section:\n\n```groovy\nimport scurry.http.HttpClient\n\n// Create HTTP client using custom settings\ndef client = new HttpClient(\n  resolveTo: [host: 'localhost', port: 8080, secure: false],\n  accept: '*/*',\n  acceptEncoding: ['deflate', 'gzip']\n)\n\n// Send GET request\nclient.get(target: '/greet', query: [name: 'Lupita']) { res -\u003e\n  println \"[client] ${res.body.toString(8192)}\"\n}\n\n// Send POST request with message body\nclient.post(target: '/echo', body: 'Can you hear me?') { res -\u003e\n  println \"[client] ${res.body.toString(8192)}\"\n}\n\n// Send empty POST request and handle client error\nclient.post(target: '/echo', body: null) { res -\u003e\n  println \"[client] ${res.statusCode} ${res.reasonPhrase}\"\n  \n  if (res.successful) println \"[client] This won't print.\"\n  else                println \"[client] Oops! ${res.body.toString(8192)}\"\n}\n```\n\n## API Documentation\n\nSee [scaladoc](https://losizm.github.io/scurry/latest/api/index.html) for\nadditional details.\n\n## License\n\n**Scurry** is licensed under Apache License, Version 2. See [LICENSE](LICENSE)\nfor more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flosizm%2Fscurry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flosizm%2Fscurry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flosizm%2Fscurry/lists"}