You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After improving error handling in responses (see #284 ), the second major problem in sttp is that there's some code overlap with https://github.com/softwaremill/tapir - specifically, everything that has to do with the HTTP model (Method, Cookie, HeaderNames, StatusCodes objects etc., as well as the potential type-safe HTTP model).
We don't like duplication so we've been wondering what to do about it :). The first idea is to create a separate "HTTP model" project, which would be used both by sttp and tapir. But then, should this be a completely separate project with its own name (and naming is hard)? Module of sttp?
One of the possibilities we've come up with is to broaden the usage of the sttp name from just HTTP client, to "HTTP-related Scala things". We would then have three top-level projects:
sttp model
sttp client (the current sttp codebase)
sttp tapir (endpoint descriptions + interpreters)
The downside of this is of course migration. That would mean that we'd have to change the package structure in both projects. The packages could be:
I think this is Ok. I would suggest something clever though that keeps the imports simple e.g. you only need sttp._. I'm not sure how that would work though as you run into path dependent types.
@aappddeevv currently it's sttp.client._, which is already much shorter than com.softwaremill.sttp._ :). As there are several projects under the sttp namespace, I think we'll need at least two components here.
After improving error handling in responses (see #284 ), the second major problem in sttp is that there's some code overlap with https://github.com/softwaremill/tapir - specifically, everything that has to do with the HTTP model (
Method
,Cookie
,HeaderNames
,StatusCodes
objects etc., as well as the potential type-safe HTTP model).We don't like duplication so we've been wondering what to do about it :). The first idea is to create a separate "HTTP model" project, which would be used both by sttp and tapir. But then, should this be a completely separate project with its own name (and naming is hard)? Module of sttp?
One of the possibilities we've come up with is to broaden the usage of the sttp name from just HTTP client, to "HTTP-related Scala things". We would then have three top-level projects:
The downside of this is of course migration. That would mean that we'd have to change the package structure in both projects. The packages could be:
As that would be a big change, we need your feedback! :)
The text was updated successfully, but these errors were encountered: