Skip to content

Commit

Permalink
Multipart/from file impl. in CLI and test suite (#2355)
Browse files Browse the repository at this point in the history
* Multipart/from file input and refactoring

* Multipart/from file input and refactoring

* fix query option

* After review

* Fixed docs

* Fixed Docs

* fmt

* merging

* added test suite for Cli

* updated

* fmt

* updated

* fmt

* fmt

* fmt

* fixed httpoptions

* fixed CommandGen

* fmt

* fix Scala 3

* fmt

* fix

* fix

* finish merging

* fmt

* fix test and match

* fixed match

* Update build.sbt

Co-authored-by: Jules Ivanic <guizmaii@users.noreply.github.com>

* merging

* merging

---------

Co-authored-by: Jules Ivanic <guizmaii@users.noreply.github.com>
  • Loading branch information
pablf and guizmaii authored Aug 19, 2023
1 parent 1071399 commit 606c8dd
Show file tree
Hide file tree
Showing 16 changed files with 1,517 additions and 699 deletions.
10 changes: 9 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,16 @@ lazy val zioHttpBenchmarks = (project in file("zio-http-benchmarks"))

lazy val zioHttpCli = (project in file("zio-http-cli"))
.settings(stdSettings("zio-http-cli"))
.settings(libraryDependencies ++= Seq(`zio-cli`))
.settings(
libraryDependencies ++= Seq(`zio-cli`),
testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework"),
libraryDependencies ++= Seq(
`zio-test`,
`zio-test-sbt`,
),
)
.dependsOn(zioHttp)
.dependsOn(zioHttpTestkit % Test)

lazy val zioHttpExample = (project in file("zio-http-example"))
.settings(stdSettings("zio-http-example"))
Expand Down
16 changes: 16 additions & 0 deletions zio-http-cli/src/main/scala/zio/http/endpoint/cli/CliClient.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package zio.http.endpoint.cli

import zio._

import zio.http._

/**
* CliClient is a wrapper for the Http Client of a HttpCliApp. It allows to
* provide a Client in different ways. DefaultClient provides the ZLayer
* Client.default.
*/
private[cli] sealed trait CliClient

private[cli] final case class CliZIOClient(client: Client) extends CliClient
private[cli] final case class CliZLayerClient(client: ZLayer[Any, Throwable, Client]) extends CliClient
private[cli] final case class DefaultClient() extends CliClient
Loading

0 comments on commit 606c8dd

Please sign in to comment.