@@ -8,6 +8,7 @@ import org.http4s.headers.{`Content-Length`, `Content-Type`}
88import org .http4s .{Charset , Header , Headers , MediaType , Method , Request , Uri }
99import org .scalatest .concurrent .ScalaFutures
1010import org .scalatest .funsuite .AnyFunSuite
11+ import org .typelevel .ci .CIString
1112
1213import scala .concurrent .ExecutionContext
1314import scala .concurrent .ExecutionContext .Implicits .global
@@ -41,11 +42,7 @@ class Http4sTest extends AnyFunSuite with ScalaFutures {
4142
4243 assertResult(""" {"sum":3}""" )(response.as[String ].unsafeRunSync())
4344
44- assertResult(
45- Headers .of(
46- `Content-Type`(MediaType .application.json),
47- `Content-Length`.fromLong(9 ).getOrElse(fail())
48- )
45+ assertResult(Headers (`Content-Type`(MediaType .application.json), `Content-Length`(9 ))
4946 )(response.headers)
5047 }
5148
@@ -65,11 +62,7 @@ class Http4sTest extends AnyFunSuite with ScalaFutures {
6562
6663 assertResult(""" {"sum":3}""" )(response.as[String ].unsafeRunSync())
6764
68- assertResult(
69- Headers .of(
70- `Content-Type`(MediaType .application.json),
71- `Content-Length`.fromLong(9 ).getOrElse(fail())
72- )
65+ assertResult(Headers (`Content-Type`(MediaType .application.json), `Content-Length`(9 ))
7366 )(response.headers)
7467 }
7568
@@ -159,7 +152,7 @@ class Http4sTest extends AnyFunSuite with ScalaFutures {
159152 Request [IO ](
160153 method = Method .POST ,
161154 uri = Uri .fromString(" com.avast.grpc.jsonbridge.test.TestService/Add" ).getOrElse(fail()),
162- headers = Headers .of (Header ( TestServiceImpl .HeaderName , headerValue))
155+ headers = Headers (Header . Raw ( CIString ( TestServiceImpl .HeaderName ) , headerValue))
163156 ).withEntity(""" { "a": 1, "b": 2} """ )
164157 .withContentType(`Content-Type`(MediaType .application.json))
165158 )
0 commit comments