{"id":15984688,"url":"https://github.com/aappddeevv/http-client","last_synced_at":"2025-10-06T21:04:27.081Z","repository":{"id":97609824,"uuid":"158624268","full_name":"aappddeevv/http-client","owner":"aappddeevv","description":"scala.js friendly HTTP and OData v4 client with support for browser, node.js.  ","archived":false,"fork":false,"pushed_at":"2019-10-28T17:35:44.000Z","size":214,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-10T05:26:05.862Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"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/aappddeevv.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":"2018-11-22T01:06:30.000Z","updated_at":"2019-10-28T17:35:46.000Z","dependencies_parsed_at":"2023-03-19T11:27:14.825Z","dependency_job_id":null,"html_url":"https://github.com/aappddeevv/http-client","commit_stats":{"total_commits":15,"total_committers":1,"mean_commits":15.0,"dds":0.0,"last_synced_commit":"b6a9b36d70ce04424bd1e4ace76bcb5df9ef6954"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aappddeevv%2Fhttp-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aappddeevv%2Fhttp-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aappddeevv%2Fhttp-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aappddeevv%2Fhttp-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aappddeevv","download_url":"https://codeload.github.com/aappddeevv/http-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247249602,"owners_count":20908211,"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":[],"created_at":"2024-10-08T02:10:10.412Z","updated_at":"2025-10-06T21:04:22.051Z","avatar_url":"https://github.com/aappddeevv.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# http-client\n\nA simple simple scalajs client for native/js/jvm environments such as browsers\nand servers. It includes both an http and odata layer layer. The http layer can\nbe used independently of the odata layer.\n\nWhat's unique in this client library? \n\n* The lower level client/backend details are exposed in order to allow you to\noptimize the use of the underlying transport API. Many other client libraries\ntry to harmonize and hide the back-end details. However, hiding the back-end\nleads to sub-optimal memory and compute resource usage. This library exposes\nthose details in a type safe way so that if you *want* to better control\nresources, you can.\n* Since it is not dependent on any other library, it has a relatively small\nfootprint--important on the browser. Individual specific client implementations\nmay have other dependencies but the core library is very small and potentially\nallows you having bundle in the scala collections library.\n* The steaming API is separate from the core\nHTTP API because streaming target types are highly varied and can arise from\nboth HTTP-level or server-side (think paging) protocols.\n\nThe initial focus is on javascript environments using scala.js.\n\nBecause a clients/backends specific types *could* be exposed, the basic classes\ntake more type parameters. The burden of using these types is hidden using smart\nconstructors, etc.\n\nThe basic functional type flow for a request/response is:\n\n* Domain object A to wrapped client/backend type C1: B1[A] =\u003e B1[C1]\n* HTTP request/response: B1[C1] =\u003e B2[C2]\n* Domain object extract to wrapped T: B2[C2] =\u003e F[T]\n\nWhile you *could* use the async effect everywhere, you do not need to and it is\nsometimes often advantageous to not use client/backend specific data types.\n\nNOTE: EXTRACTION AND REFACTORING IS IN PROGRESS. STAY TUNED!\n\n# Fast Start\n\n```scala\n// use cats-effect IO\nimplicit val client = BrowserFetchClient[IO]()\nval myRequest = http.empty.path(\"/accounts\")\nimplicit val decoder = decoders.fastJson\n\n// Client API centric, no implicits needed\nclient.fetchAs(myRequest)(decoder)\n  .\n  \n// Client API centric, no implicit needed for decoder\nclent.fetchAs(myRequest)\n  .\n\n// Request object API centric \nmyRequest.send\n  .\n\n```\n\n\n# Other HTTP clients\n\nThere are already a few HTTP clients:\n\n* [shttp](https://sttp.readthedocs.io/en/latest/index.html)\n* [RosHTTP](https://github.com/hmil/RosHTTP)\n* [scalaj-http](https://github.com/scalaj/scalaj-http)\n* [http4s](https://github.com/http4s)\n* Many more!\n\nAnd more, such as akka http. However not all clients are available under\nscala.js.\n\n\n# License\n\nMIT license.\n\nCopyright 2019. The Trapelo Group, LLC.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faappddeevv%2Fhttp-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faappddeevv%2Fhttp-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faappddeevv%2Fhttp-client/lists"}