{"id":19454836,"url":"https://github.com/fancellu/http4s-circe-example","last_synced_at":"2025-04-25T05:30:40.335Z","repository":{"id":71450665,"uuid":"255884080","full_name":"fancellu/http4s-circe-example","owner":"fancellu","description":"Example of http4s server with various endpoints","archived":false,"fork":false,"pushed_at":"2022-12-12T19:59:36.000Z","size":26,"stargazers_count":13,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-03T16:52:12.659Z","etag":null,"topics":["cats-effect","circe","fs2","http4s","http4s-client","http4s-munit","log4cats","munit","sbt-resolver","scalatags"],"latest_commit_sha":null,"homepage":"","language":"Scala","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/fancellu.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":"2020-04-15T10:34:41.000Z","updated_at":"2025-04-02T12:01:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"62119097-aa01-4d47-88b0-7febbc4a8b7d","html_url":"https://github.com/fancellu/http4s-circe-example","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/fancellu%2Fhttp4s-circe-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fancellu%2Fhttp4s-circe-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fancellu%2Fhttp4s-circe-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fancellu%2Fhttp4s-circe-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fancellu","download_url":"https://codeload.github.com/fancellu/http4s-circe-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250760582,"owners_count":21482831,"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":["cats-effect","circe","fs2","http4s","http4s-client","http4s-munit","log4cats","munit","sbt-resolver","scalatags"],"created_at":"2024-11-10T17:12:10.713Z","updated_at":"2025-04-25T05:30:40.312Z","avatar_url":"https://github.com/fancellu.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# http4s-circe-example\n\nExample of http4s server with various endpoints\n\nTo run ```sbt run``` or you can use sbt-revolver with ```sbt ~reStart```\n\n## Endpoints\n\nhttp://localhost:8080/greet\n=\u003e json\n\nhttp://localhost:8080/hello/{name}\n=\u003e text\n\nhttp://localhost:8080/hello?name=\n=\u003e text\n\nhttp://localhost:8080/literal\n=\u003e json\n\nhttp://localhost:8080/gzip\n=\u003e lots of gzipped text\n\nhttp://localhost:8080/mystream\n=\u003e an endless chunked stream\n\nhttp://localhost:8080/fs/hello.txt\n=\u003e static text from classpath\n\nhttp://localhost:8080/fs/form.html\n=\u003e HTML Form, which takes username and handles it via UrlForm\n\nPOST with some payload, you should get it back(use postman or similar)\n\nhttp://localhost:8080/echo\n=\u003e Whatever you sent\n\nhttp://localhost:8080/random\n=\u003e a random digit\n\nhttp://localhost:8080/counter\n=\u003e incrementing digit (hacky)\n\nhttp://localhost:8080/counter2\n=\u003e incrementing digit (Better, with Ref)\n\nhttp://localhost:8080/slow\n=\u003e sleeps for 4 seconds\n\n(Client examples)\n\nCalling our own endpoints\n\n- http://localhost:8080/client/slow (timesout and fallsback to canned value)\n- http://localhost:8080/client/twiceslow (calls /slow twice, in parallel)\n\nTalking to external web service https://jsonplaceholder.typicode.com/\n\n- http://localhost:8080/client/users\n- http://localhost:8080/client/users/1\n- http://localhost:8080/client/users/999\n- http://localhost:8080/client/posts\n- http://localhost:8080/client/posts/1\n- http://localhost:8080/client/posts/999\n- http://localhost:8080/client/todos\n- http://localhost:8080/client/todos/1\n- http://localhost:8080/client/todos/999\n\nTalking to OpenAI Dall-E\n\n(To use it you'll have to fill in your OpenAI `OPENAI_API_KEY` in the Environment)\n\n- http://localhost:8080/openai/dalle/a+ginger+cat,+wearing+round+black+glasses,+riding+a+bike+and+smoking+a+pipe,+photorealistic\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffancellu%2Fhttp4s-circe-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffancellu%2Fhttp4s-circe-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffancellu%2Fhttp4s-circe-example/lists"}