Skip to content

Commit

Permalink
Try dropping null values
Browse files Browse the repository at this point in the history
  • Loading branch information
armanbilge committed Jul 18, 2022
1 parent 5b1067f commit 72febd1
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ import org.http4s.Method
import org.http4s.Query
import org.http4s.Request
import org.http4s.Uri
import org.http4s.circe.CirceEntityCodec._
import org.http4s.circe.CirceEntityDecoder
import org.http4s.circe.CirceEntityEncoder
import org.http4s.circe.CirceInstances
import org.http4s.client.Client

trait BundleMonClient[F[_]] {
Expand Down Expand Up @@ -61,7 +63,9 @@ object BundleMonClient {

val baseUri = (endpoint / "v1").copy(query = authQuery)

new BundleMonClient[F] {
new BundleMonClient[F] with CirceInstances with CirceEntityDecoder with CirceEntityEncoder {

override protected val defaultPrinter = super.defaultPrinter.copy(dropNullValues = true)

def getOrCreateProjectId(payload: GitDetails): F[Project] = {
val uri = baseUri / "projects" / "id"
Expand Down Expand Up @@ -89,7 +93,7 @@ object BundleMonClient {
client
.expect[Json](
Request[F](Method.POST, uri, headers = headers).withEntity(payload)
)
)(jsonDecoder)
.void
}

Expand Down

0 comments on commit 72febd1

Please sign in to comment.