{"id":24411460,"url":"https://github.com/fullfacing/akkamonixsttpbackend","last_synced_at":"2025-04-12T02:51:26.633Z","repository":{"id":36546442,"uuid":"195996635","full_name":"fullfacing/akkaMonixSttpBackend","owner":"fullfacing","description":"A STTP backend that utilizes Monix Observables and Tasks.","archived":false,"fork":false,"pushed_at":"2024-07-29T15:22:25.000Z","size":202,"stargazers_count":14,"open_issues_count":14,"forks_count":2,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-03-25T22:35:40.091Z","etag":null,"topics":["akka-http","monix","streaming","sttp"],"latest_commit_sha":null,"homepage":null,"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/fullfacing.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":"2019-07-09T11:38:11.000Z","updated_at":"2023-06-10T06:17:46.000Z","dependencies_parsed_at":"2023-02-16T00:05:38.662Z","dependency_job_id":null,"html_url":"https://github.com/fullfacing/akkaMonixSttpBackend","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fullfacing%2FakkaMonixSttpBackend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fullfacing%2FakkaMonixSttpBackend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fullfacing%2FakkaMonixSttpBackend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fullfacing%2FakkaMonixSttpBackend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fullfacing","download_url":"https://codeload.github.com/fullfacing/akkaMonixSttpBackend/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248509356,"owners_count":21115998,"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":["akka-http","monix","streaming","sttp"],"created_at":"2025-01-20T06:38:26.458Z","updated_at":"2025-04-12T02:51:26.612Z","avatar_url":"https://github.com/fullfacing.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CircleCI](https://circleci.com/gh/fullfacing/akkaMonixSttpBackend.svg?style=shield\u0026circle-token=2547983c39c2197e6663282e9ae20f77eb97e03b)](https://circleci.com/gh/fullfacing/akkaMonixSttpBackend)\n[![Maven Central](https://img.shields.io/maven-central/v/com.fullfacing/sttp-akka-monix-task_2.13.svg)](https://search.maven.org/search?q=a:sttp-akka-monix-task_2.13)\n[![Scala Steward badge](https://img.shields.io/badge/Scala_Steward-helping-blue.svg?style=flat\u0026logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAQCAMAAAARSr4IAAAAVFBMVEUAAACHjojlOy5NWlrKzcYRKjGFjIbp293YycuLa3pYY2LSqql4f3pCUFTgSjNodYRmcXUsPD/NTTbjRS+2jomhgnzNc223cGvZS0HaSD0XLjbaSjElhIr+AAAAAXRSTlMAQObYZgAAAHlJREFUCNdNyosOwyAIhWHAQS1Vt7a77/3fcxxdmv0xwmckutAR1nkm4ggbyEcg/wWmlGLDAA3oL50xi6fk5ffZ3E2E3QfZDCcCN2YtbEWZt+Drc6u6rlqv7Uk0LdKqqr5rk2UCRXOk0vmQKGfc94nOJyQjouF9H/wCc9gECEYfONoAAAAASUVORK5CYII=)](https://scala-steward.org)\n\n# akkaMonixSttpBackend\n**Introduction:**\u003cbr/\u003e\nakkaMonixSttpBackend is a backend for [sttp](https://sttp.readthedocs.io/en/latest/index.html) using [Akka-HTTP](https://doc.akka.io/docs/akka-http/current/index.html) to handle requests, and with [Task](https://monix.io/docs/3x/eval/task.html) as the response Monad and [Observable](https://monix.io/docs/3x/reactive/observable.html) as the streaming type. It is a modification of the [Akka-HTTP backend](https://sttp.readthedocs.io/en/latest/backends/akkahttp.html) provided by sttp, with instances of Futures deferred to Tasks and Akka-Streams Sources converted to Observables.\n\nThe motivation behind creating this backend as opposed to using the existing [Monix wrapped async-http-client backend](https://sttp.readthedocs.io/en/latest/backends/asynchttpclient.html) is to give an alternative for projects that already have Akka-HTTP as a dependency, removing the need for the async-http-client dependency as well.\n\n**Installation:**\u003cbr/\u003e Add the following sbt dependency:\u003cbr/\u003e\n`\"com.fullfacing\" %% \"sttp-akka-monix-task\" % \"1.5.0\"`\u003cbr/\u003e\n\n**Usage:**\u003cbr/\u003e\nUsage is identical to the [Akka-HTTP backend](https://sttp.readthedocs.io/en/latest/backends/akkahttp.html) with only the response type differing:\n```scala\nimport akka.util.ByteString\nimport com.fullfacing.akka.monix.task.backend.AkkaMonixHttpBackend\nimport sttp.client.{Response, SttpBackend, _}\nimport monix.eval.Task\nimport monix.reactive.Observable\n\nimplicit val backend: SttpBackend[Task, Observable[ByteString], NothingT] = AkkaMonixHttpBackend()\n\n// To set the request body as a stream:\nval observable: Observable[ByteString] = ???\n\nsttp\n  .streamBody(observable)\n  .post(uri\"...\")\n  .send()\n\n// To receive the response body as a stream:\nval response: Task[Response[Observable[ByteString]]] =\n  sttp\n    .post(uri\"...\")\n    .response(asStream[Observable[ByteString]])\n    .send()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffullfacing%2Fakkamonixsttpbackend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffullfacing%2Fakkamonixsttpbackend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffullfacing%2Fakkamonixsttpbackend/lists"}