{"id":23728476,"url":"https://github.com/leeturner/callback-logger","last_synced_at":"2026-02-18T09:30:16.119Z","repository":{"id":157131615,"uuid":"632077507","full_name":"leeturner/callback-logger","owner":"leeturner","description":"Simple service to receive callbacks.  Useful for when testing APIs locally that send callbacks ","archived":false,"fork":false,"pushed_at":"2025-02-17T09:41:17.000Z","size":702,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-17T10:28:15.786Z","etag":null,"topics":["h2-database","kotlin","micronaut","thymeleaf"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leeturner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-04-24T16:58:52.000Z","updated_at":"2025-02-17T09:41:18.000Z","dependencies_parsed_at":"2024-01-19T16:32:23.198Z","dependency_job_id":"be5fc5aa-4a5d-4cba-9382-7d99c1b4eb0c","html_url":"https://github.com/leeturner/callback-logger","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leeturner%2Fcallback-logger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leeturner%2Fcallback-logger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leeturner%2Fcallback-logger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leeturner%2Fcallback-logger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leeturner","download_url":"https://codeload.github.com/leeturner/callback-logger/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239832398,"owners_count":19704607,"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":["h2-database","kotlin","micronaut","thymeleaf"],"created_at":"2024-12-31T01:51:16.931Z","updated_at":"2026-02-18T09:30:16.070Z","avatar_url":"https://github.com/leeturner.png","language":"Kotlin","readme":"# callback-logger\n\n![buildStatus](https://img.shields.io/github/workflow/status/leeturner/callback-logger/Java%20CI%20with%20Gradle?style=plastic)\n![latestVersion](https://img.shields.io/github/v/release/leeturner/callback-logger)\n\u003ca href=\"https://twitter.com/leeturner\" target=\"_blank\"\u003e\n\u003cimg alt=\"Twitter: leeturner\" src=\"https://img.shields.io/twitter/follow/leeturner.svg?style=social\" /\u003e\n\u003c/a\u003e\n\n\u003e Simple service to receive callbacks. Useful for when testing APIs locally that send callbacks\n\n## 🦿 Prerequisites\n\n- Java 17 or above\n\n## 🛠 Installation\n\n1. Download latest sources and run:\n \n ```shell script\n./gradlew build run\n```\n\n## ⌨️ Usage\n\nOnce up and running you can set the callback url of the API you are testing to the callback endpoint of `callback-logger` - \n`http://localhost:7070/callback-logger/api/callback`.  Both `POST` and `PUT` methods are supported for the callback \nendpoint along with multiple content types.  You can send a callback manually using the following `curl` request:\n\n```shell\ncurl -X POST --location \"http://localhost:7070/callback-logger/api/callback\" \\\n    -H \"Content-Type: application/json\" \\\n    -d \"{\\\"hello\\\": \\\"world\\\"}\"\n```\n\nor\n\n```shell\ncurl -X PUT --location \"http://localhost:7070/callback-logger/api/callback\" \\\n    -H \"Content-Type: application/xml\" \\\n    -d \"\u003chello\u003eworld\u003c/hello\u003e\" \n```\n\n### Custom callbacks\n\nIf you need to send callbacks to different callback endpoints than the default `callback-logger` endpoint then you can\ndefine custom callbacks.  Custom callbacks are defined in the `application.conf` file and are defined as a list of `put`\nor `post` URIs.  For example:\n\n```hocon\ncallback-logger {\n  custom-callbacks {\n    post = [\"/api/custom1\", \"/api/custom2\"]\n    put = [\"/api/custom1\"]\n  }\n}\n```\n\nAny duplicate URIs will be ignored and all custom URIs need to start with a `/`.  You can then send callbacks to the \ncustom endpoints using the following `curl` request:\n\n```shell\ncurl -X PUT --location \"http://localhost:7070/api/custom1\" \\\n    -H \"Content-Type: application/xml\" \\\n    -d \"\u003chello\u003eworld\u003c/hello\u003e\" \n```\n### Specify the http response code\n\nBy default, callback-logger returns a `200` response code for all callbacks.  If you need to return a different response\ncode then you can define the response code in the `application.conf` file.  For example:\n\n```hocon\ncallback-logger {\n  custom-callback-response-code = 201\n  callback-response-payload = \"\"\n  custom-callbacks {\n    post = [\"/api/custom1\", \"/api/custom2\"]\n    put = [\"/api/custom1\"]\n  }\n}\n```\n\nThe application will fail to start if the response code is not a valid http response code.\n\n### Specify the http response payload\n\nBy default, callback-logger returns an empty string as the response payload for all callbacks.  If you need to return a different response\npayload then you can change that in the `application.conf` file.  For example:\n\n```hocon\ncallback-logger {\n  custom-callback-response-code = 200\n  callback-response-payload = \"{\\\"status\\\": \\\"OK\\\", \\\"message\\\": \\\"Callback received\\\"}\"\n  custom-callbacks {\n    post = [\"/api/custom1\", \"/api/custom2\"]\n    put = [\"/api/custom1\"]\n  }\n}\n```\n\n### Web UI\n\n`callback-logger` provides a simple web interface to allow you to see the callbacks you have received.  You can access\nthe web interface by pointing your browser to `http://localhost:7070/callback-logger`:\n\n\n![](docs/callback-logger-ui.png)\n\n\n## 🥼 Run tests\n\n```shell script\n./gradlew test\n```\n\n## ✍️ Author\n\n👤 **Lee Turner**\n\n* Mastodon: \u003ca href=\"https://hachyderm.io/@leeturner\" target=\"_blank\"\u003e@leeturner\u003c/a\u003e\n* Twitter: \u003ca href=\"https://twitter.com/leeturner\" target=\"_blank\"\u003e@leeturner\u003c/a\u003e\n\nFeel free to ping me 😉\n\n## 🤝 Contributing\n\nContributions are what make the open source community such an amazing place to be learn, inspire, and create. Any\ncontributions you make are **greatly appreciated**.\n\n1. Open an issue first to discuss what you would like to change.\n1. Fork the Project\n1. Create your feature branch (`git checkout -b feature/amazing-feature`)\n1. Commit your changes (`git commit -m 'Add some amazing feature'`)\n1. Push to the branch (`git push origin feature/amazing-feature`)\n1. Open a pull request\n\nPlease make sure to update tests as appropriate.\n\n## ❤ Show your support\n\nGive a ⭐️ if this project helped you!\n\n\u003ca href=\"https://www.buymeacoffee.com/leeturner\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png\" alt=\"Buy Me A Coffee\" width=\"160\"\u003e\n\u003c/a\u003e\n\n## ☑️ TODO\n\n- [ ] Setup releases using jReleaser\n\n## 📝 License\n\n```\nCopyright © 2023 - Lee Turner\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\n_This README was generated by [readgen](https://github.com/theapache64/readgen)_ ❤","funding_links":["https://www.buymeacoffee.com/leeturner"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleeturner%2Fcallback-logger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleeturner%2Fcallback-logger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleeturner%2Fcallback-logger/lists"}