# sttp client

**URL:** https://softwaremill.community/c/sttp-client/6.md

[Latest](https://softwaremill.community/latest.md) · [Categories](https://softwaremill.community/categories.md) · [Tags](https://softwaremill.community/tags.md)

---

## [About the sttp client category](https://softwaremill.community/t/about-the-sttp-client-category/11)

<div class="topic-metadata">

**Author:** [@adamw](https://softwaremill.community/u/adamw)\
**Replies:** 0

</div>

Discussions, usage questions and ideas related to sttp client (https://sttp.softwaremill.com): the Scala HTTP client you always wanted!

---

## [OpenTelemetryMetricsBackend and metrics cost ( cardinality )](https://softwaremill.community/t/opentelemetrymetricsbackend-and-metrics-cost-cardinality/539)

<div class="topic-metadata">

**Author:** [@oNouguier](https://softwaremill.community/u/oNouguier)\
**Replies:** 2\
**Last updated:** [February 19, 2026, 3:48pm UTC](https://softwaremill.community/t/opentelemetrymetricsbackend-and-metrics-cost-cardinality/539 "2026-02-19T15:48:34Z")

</div>

With OpenTelemetryMetricsBackend, it seems that too many metrics are produced, then cost is really expensive when billing is proportional with cardinality. Probably because URI and query parameters are part of emitted me…

---

## [Sttp client with restricted headers](https://softwaremill.community/t/sttp-client-with-restricted-headers/533)

<div class="topic-metadata">

**Author:** [@tgabriel](https://softwaremill.community/u/tgabriel)\
**Replies:** 1\
**Last updated:** [November 28, 2025, 9:13am UTC](https://softwaremill.community/t/sttp-client-with-restricted-headers/533 "2025-11-28T09:13:03Z")

</div>

Hello, We just integrated tapir with sttp client in our project, and we found an impediment: we need to send the “host” header along, which is a restricted header for the underlying java HTTP client. I have found that …

---

## [Redirects for HEAD requests](https://softwaremill.community/t/redirects-for-head-requests/492)

<div class="topic-metadata">

**Author:** [@polymorphic](https://softwaremill.community/u/polymorphic)\
**Replies:** 2\
**Last updated:** [May 15, 2025, 10:43pm UTC](https://softwaremill.community/t/redirects-for-head-requests/492 "2025-05-15T22:43:05Z")

</div>

Hello, I’m using version 3.11.0 and noticed that HEAD requests don’t seem to follow redirects? Here’s an example similar to the sample code from the docs, modified accordingly: val syncBackend = HttpClientSyncBacken…

---

## [Disable transfer-encoding chunked](https://softwaremill.community/t/disable-transfer-encoding-chunked/485)

<div class="topic-metadata">

**Author:** [@MaxPeroch](https://softwaremill.community/u/MaxPeroch)\
**Replies:** 0\
**Last updated:** [May 1, 2025, 10:06pm UTC](https://softwaremill.community/t/disable-transfer-encoding-chunked/485 "2025-05-01T22:06:42Z")

</div>

Hello, Is there any way to disable “transfer-encoding chunked” when sending a multipart request? My understanding is that if the content length is provided, it shouldn’t chunk the request, right? I’m actually unsure if…

---

## [Any plans to build akka-http-backend for non-apache licensed version of akka (\> 2.6.20)](https://softwaremill.community/t/any-plans-to-build-akka-http-backend-for-non-apache-licensed-version-of-akka-2-6-20/484)

<div class="topic-metadata">

**Author:** [@maslovalex](https://softwaremill.community/u/maslovalex)\
**Replies:** 2\
**Last updated:** [April 1, 2025, 1:58pm UTC](https://softwaremill.community/t/any-plans-to-build-akka-http-backend-for-non-apache-licensed-version-of-akka-2-6-20/484 "2025-04-01T13:58:40Z")

</div>

Hi, Current akka-http-backend artifacts are only available for Scala2. Latest version of akka-http:10.7.0 and akka-stream:2.10.2 which all have already Scala3 support. What are the plans for akka-http-backend ? Waiti…

---

## [Json schema - wrong schema for enum](https://softwaremill.community/t/json-schema-wrong-schema-for-enum/475)

<div class="topic-metadata">

**Author:** [@Bartlomiej\_Tomala](https://softwaremill.community/u/Bartlomiej_Tomala)\
**Replies:** 1\
**Last updated:** [February 27, 2025, 1:05pm UTC](https://softwaremill.community/t/json-schema-wrong-schema-for-enum/475 "2025-02-27T13:05:50Z")

</div>

Hi all, I’m trying to add JSON schema to our API. I found an issue using enums as discriminators. The below example generates a schema for the enum like this: "Shape": { "title": "Shape", "type": "string", …

---

## [Async-http-client backends removal](https://softwaremill.community/t/async-http-client-backends-removal/468)

<div class="topic-metadata">

**Author:** [@MaxPeroch](https://softwaremill.community/u/MaxPeroch)\
**Replies:** 7\
**Last updated:** [January 20, 2025, 6:11pm UTC](https://softwaremill.community/t/async-http-client-backends-removal/468 "2025-01-20T18:11:30Z")

</div>

Hello, I see that those backends were recently removed (Remove async-http-client backends by adamw · Pull Request #2373 · softwaremill/sttp · GitHub). Is there any alternative for a CE backend that supports streaming and…

---

## [PRs to fix deserialization problems with Ollama in \`sttp-openai\`](https://softwaremill.community/t/prs-to-fix-deserialization-problems-with-ollama-in-sttp-openai/462)

<div class="topic-metadata">

**Author:** [@kapunga](https://softwaremill.community/u/kapunga)\
**Replies:** 0\
**Last updated:** [December 7, 2024, 3:40pm UTC](https://softwaremill.community/t/prs-to-fix-deserialization-problems-with-ollama-in-sttp-openai/462 "2024-12-07T15:40:58Z")

</div>

When using sttp-openai with a locally running instance of Ollama, I ran into several serialization issues. These PRs should fix the problems: Deserialize to custom model where possible Fix Choices Deserialization I’d…

---

## [SttpClientInterpreter and client4?](https://softwaremill.community/t/sttpclientinterpreter-and-client4/454)

<div class="topic-metadata">

**Author:** [@Dima\_Tkach](https://softwaremill.community/u/Dima_Tkach)\
**Replies:** 1\
**Last updated:** [November 14, 2024, 8:22pm UTC](https://softwaremill.community/t/sttpclientinterpreter-and-client4/454 "2024-11-14T20:22:45Z")

</div>

I am trying to upgrade to sttp client 4, but can’t figure out how to manage SttpClientInterprer. I am on 1.11.9 (which I think is the latest now), but SttpClientInterpreter().toSecureRequest(...) returns A =\> I =\> cli…

---

## [URI decoding when making sttp request](https://softwaremill.community/t/uri-decoding-when-making-sttp-request/447)

<div class="topic-metadata">

**Author:** [@rluk](https://softwaremill.community/u/rluk)\
**Replies:** 3\
**Last updated:** [October 16, 2024, 6:48pm UTC](https://softwaremill.community/t/uri-decoding-when-making-sttp-request/447 "2024-10-16T18:48:03Z")

</div>

Hey all! I ran into an issue where requests to a certain website were failing because the uri decoding that sttp does causes the verification to fail. eg. scala\> import sttp.client4.\_ …

---

## [Optional headers serialised incorrectly by OpenAPI generated code](https://softwaremill.community/t/optional-headers-serialised-incorrectly-by-openapi-generated-code/391)

<div class="topic-metadata">

**Author:** [@jakub-nezasa](https://softwaremill.community/u/jakub-nezasa)\
**Replies:** 6\
**Last updated:** [May 20, 2024, 9:31am UTC](https://softwaremill.community/t/optional-headers-serialised-incorrectly-by-openapi-generated-code/391 "2024-05-20T09:31:04Z")

</div>

Hi, We are generating Scala code with scala-sttp. The operation specification would contain: parameters: - in: header name: Contract-Id required: false schema: type: string The generate…

---

## [Strange response returned by sttp](https://softwaremill.community/t/strange-response-returned-by-sttp/389)

<div class="topic-metadata">

**Author:** [@rluk](https://softwaremill.community/u/rluk)\
**Replies:** 1\
**Last updated:** [April 29, 2024, 6:33am UTC](https://softwaremill.community/t/strange-response-returned-by-sttp/389 "2024-04-29T06:33:55Z")

</div>

Hey all! I was writing an integration test for one of my endpoints, using tapir, sttp and circe, when I ran into a weird response being returned. My endpoint returns a Unit which I think should be decodable by circe, h…

---

## [How to enable logging for sttp.client4](https://softwaremill.community/t/how-to-enable-logging-for-sttp-client4/386)

<div class="topic-metadata">

**Author:** [@nemoo](https://softwaremill.community/u/nemoo)\
**Replies:** 2\
**Last updated:** [April 23, 2024, 10:20am UTC](https://softwaremill.community/t/how-to-enable-logging-for-sttp-client4/386 "2024-04-23T10:20:02Z")

</div>

I want to log all outgoing requests sent via sttp.client4 I am using the quickRequest api. I tried to enable logging of sttp by adding this line to my logback.xml: \<logger name="sttp.client4" level="DEBUG" /\> That …

---

## [SttpClientInterpreter and constant headers](https://softwaremill.community/t/sttpclientinterpreter-and-constant-headers/350)

<div class="topic-metadata">

**Author:** [@jni](https://softwaremill.community/u/jni)\
**Replies:** 1\
**Last updated:** [January 5, 2024, 10:33am UTC](https://softwaremill.community/t/sttpclientinterpreter-and-constant-headers/350 "2024-01-05T10:33:24Z")

</div>

Hi, We have endpoints defined with some constant headers, eg: .out(header(Header.cacheControl(Public, MaxAge(1 hour), StaleWhileRevalidate(1 day)))) The endpoints definitions are shared between server and clients. The…

---

## [WebSocket state monitoring](https://softwaremill.community/t/websocket-state-monitoring/308)

<div class="topic-metadata">

**Author:** [@ycomb](https://softwaremill.community/u/ycomb)\
**Replies:** 1\
**Last updated:** [November 21, 2023, 3:34pm UTC](https://softwaremill.community/t/websocket-state-monitoring/308 "2023-11-21T15:34:09Z")

</div>

Hi, I’m trying to adopt sttp4 client to interact with a server via WebSockets. WebSockets seems unstable. For example, if the connection drops sttp4 throws exception Caused by: java.io.IOException: Software caused conne…

---

## [sttp.monad.MonadError#blocking for cats-effect](https://softwaremill.community/t/sttp-monad-monaderror-blocking-for-cats-effect/314)

<div class="topic-metadata">

**Author:** [@flipp5b](https://softwaremill.community/u/flipp5b)\
**Replies:** 3\
**Last updated:** [November 9, 2023, 8:12am UTC](https://softwaremill.community/t/sttp-monad-monaderror-blocking-for-cats-effect/314 "2023-11-09T08:12:26Z")

</div>

Hi there! First of all, thank you for the great library! I have a question about sttp.monad.MonadError#blocking implementation for cats-effect. If I’m not mistaken, CatsMonadAsyncError uses the default implementation f…

---

## [WebSocket state monitoring](https://softwaremill.community/t/websocket-state-monitoring/306)

<div class="topic-metadata">

**Author:** [@ycomb](https://softwaremill.community/u/ycomb)\
**Replies:** 0\
**Last updated:** [November 1, 2023, 10:00am UTC](https://softwaremill.community/t/websocket-state-monitoring/306 "2023-11-01T10:00:09Z")

</div>

Hi, I’m trying to adopt sttp4 client to interact with server via WebSockets. WebSockets seems unstable. For example, if a connection drops, sttp4 throws exception: Exception in thread "main" java.lang.ExceptionInInitia…

---

## [Limit the download size of an Sttp client](https://softwaremill.community/t/limit-the-download-size-of-an-sttp-client/270)

<div class="topic-metadata">

**Author:** [@MaxPeroch](https://softwaremill.community/u/MaxPeroch)\
**Replies:** 3\
**Last updated:** [September 14, 2023, 10:00pm UTC](https://softwaremill.community/t/limit-the-download-size-of-an-sttp-client/270 "2023-09-14T22:00:03Z")

</div>

Hello, I’m trying to setup an Sttp (4) client to download some files through Fs2 as a Stream. I was wondering if it was possible to configure the client in a way that it would fail if a file is deemed to large? Thank y…

---

## [Whether okhttp +fs2.stream backend implementation exist or not?](https://softwaremill.community/t/whether-okhttp-fs2-stream-backend-implementation-exist-or-not/269)

<div class="topic-metadata">

**Author:** [@YuMuuu](https://softwaremill.community/u/YuMuuu)\
**Replies:** 2\
**Last updated:** [August 29, 2023, 11:53pm UTC](https://softwaremill.community/t/whether-okhttp-fs2-stream-backend-implementation-exist-or-not/269 "2023-08-29T23:53:46Z")

</div>

I need okhttp + effect system (of cats.effect.IO) + stream support combination. But it doesn’t seem to exist in existing implementations. Also, I tried to create a custom backend that inherited from OkHttpAsyncBackend,…

---

## [Planned release date for STTP 4](https://softwaremill.community/t/planned-release-date-for-sttp-4/256)

<div class="topic-metadata">

**Author:** [@Donatas\_Kucinskas](https://softwaremill.community/u/Donatas_Kucinskas)\
**Replies:** 1\
**Last updated:** [July 25, 2023, 7:52pm UTC](https://softwaremill.community/t/planned-release-date-for-sttp-4/256 "2023-07-25T19:52:02Z")

</div>

Hey, first of all - thank you for an amazing client! I’m wondering what’s the status of STTP 4 (apart from there being an Milestone 2 release) and when can a first stable release be expected?

---

## [Is it possible to use Sttp on Scala native?](https://softwaremill.community/t/is-it-possible-to-use-sttp-on-scala-native/233)

<div class="topic-metadata">

**Author:** [@sergeda](https://softwaremill.community/u/sergeda)\
**Replies:** 6\
**Last updated:** [June 27, 2023, 6:49pm UTC](https://softwaremill.community/t/is-it-possible-to-use-sttp-on-scala-native/233 "2023-06-27T18:49:57Z")

</div>

I’m trying to use Sttp 3 client in Scala native project. I’ve added these dependencies: "com.softwaremill.sttp.client3" %% "async-http-client-backend-cats" % "3.8.15", "com.softwaremill.sttp.client3" % "cat…

---

## [Sttp client 4: improving the developer experience](https://softwaremill.community/t/sttp-client-4-improving-the-developer-experience/94)

<div class="topic-metadata">

**Author:** [@adamw](https://softwaremill.community/u/adamw)\
**Replies:** 8\
**Last updated:** [May 24, 2023, 12:34am UTC](https://softwaremill.community/t/sttp-client-4-improving-the-developer-experience/94 "2023-05-24T00:34:16Z")

</div>

Adrien Piquerez created a thorough and code-complete proposal on overhauling sttp client’s RequestT and SttpBackend types, by splitting them into multiple traits/classes, and thus reducing the number of type parameters. …

---

## [Java 17: Missing content-length header on a multipartfile request](https://softwaremill.community/t/java-17-missing-content-length-header-on-a-multipartfile-request/206)

<div class="topic-metadata">

**Author:** [@leszek](https://softwaremill.community/u/leszek)\
**Replies:** 9\
**Last updated:** [May 21, 2023, 3:28pm UTC](https://softwaremill.community/t/java-17-missing-content-length-header-on-a-multipartfile-request/206 "2023-05-21T15:28:51Z")

</div>

Hello, I am using STTP 3.8.15 with ZIO backend, Java 17 ZULU. So, given this code override def uploadFile( connection: Connection, path: String, file: File, overwrite: Boolean ): IO\[BusinessError, …

---

## [Cut new release? Snapshot releases?](https://softwaremill.community/t/cut-new-release-snapshot-releases/168)

<div class="topic-metadata">

**Author:** [@ioleo](https://softwaremill.community/u/ioleo)\
**Replies:** 0\
**Last updated:** [March 29, 2023, 9:49am UTC](https://softwaremill.community/t/cut-new-release-snapshot-releases/168 "2023-03-29T09:49:02Z")

</div>

We depend on sttp and need to bump zio-json to 0.5.0. It’s already on sttp master branch. Can we cut another minor release? Or are there SNAPSHOT releases available somewhere? (sttp client3) Kind regards

---

## [Sending large files through multipart IS #1780](https://softwaremill.community/t/sending-large-files-through-multipart-is-1780/163)

<div class="topic-metadata">

**Author:** [@Philldomd](https://softwaremill.community/u/Philldomd)\
**Replies:** 2\
**Last updated:** [March 27, 2023, 11:30am UTC](https://softwaremill.community/t/sending-large-files-through-multipart-is-1780/163 "2023-03-27T11:30:58Z")

</div>

Hi, I am trying to send large files thourgh multipart but it doesn’t seem to get the right output buffer from Http. I have tried to send in contentLength to PUT Header, MultipartBody and to multipart(as header(string, …

---

## [HttpClientCatsBackend vs AsyncHttpClientCatsBackend](https://softwaremill.community/t/httpclientcatsbackend-vs-asynchttpclientcatsbackend/130)

<div class="topic-metadata">

**Author:** [@squadgazzz](https://softwaremill.community/u/squadgazzz)\
**Replies:** 1\
**Last updated:** [February 16, 2023, 10:04am UTC](https://softwaremill.community/t/httpclientcatsbackend-vs-asynchttpclientcatsbackend/130 "2023-02-16T10:04:48Z")

</div>

Since AsyncHttpClientCatsBackend was de-depricated and HttpClientCatsBackend is also async, is there any difference between them and how to choose which one to use?

---

## [Unable to access http4s route with sttp-client](https://softwaremill.community/t/unable-to-access-http4s-route-with-sttp-client/126)

<div class="topic-metadata">

**Author:** [@squadgazzz](https://softwaremill.community/u/squadgazzz)\
**Replies:** 1\
**Last updated:** [February 14, 2023, 8:17am UTC](https://softwaremill.community/t/unable-to-access-http4s-route-with-sttp-client/126 "2023-02-14T08:17:46Z")

</div>

Hello! I am using sttp-client v3.8.11 with http4s v0.23.17. I have a configured route HttpRoutes .of\[F\] { case GET -\> Root / "users" / userId =\> ??? } And I am getting the following error while sending a GET req…

---

## [Async-http-client-backend-cats vs httpclient-backend](https://softwaremill.community/t/async-http-client-backend-cats-vs-httpclient-backend/93)

<div class="topic-metadata">

**Author:** [@david](https://softwaremill.community/u/david)\
**Replies:** 4\
**Last updated:** [January 18, 2023, 11:17pm UTC](https://softwaremill.community/t/async-http-client-backend-cats-vs-httpclient-backend/93 "2023-01-18T23:17:03Z")

</div>

Last time I used sttp I used the async http client (netty): cats-effect backend — sttp 3 documentation. But now I see that the latest docs don’t mention this backend anymore, and refer only to the HttpClient backend: cat…

---

## [Is the scala-sttp openapi generator still available?](https://softwaremill.community/t/is-the-scala-sttp-openapi-generator-still-available/88)

<div class="topic-metadata">

**Author:** [@David\_Goodenough](https://softwaremill.community/u/David_Goodenough)\
**Replies:** 3\
**Last updated:** [January 18, 2023, 11:36am UTC](https://softwaremill.community/t/is-the-scala-sttp-openapi-generator-still-available/88 "2023-01-18T11:36:46Z")

</div>

I notice that it has not been updated in a while (maybe it did not need updating), but if I download the openapi-generator jar and list the available plugins it is not listed.

[Next page](https://softwaremill.community/c/sttp-client/6.md?page=1)
