3
value unsafePerformSync is not a member of scalaz.concurrent.Task[String]
[error] val x = task.unsafePerformSync
[error] ^
[error] one error found
위의 (2.11.8) scalac 오류를 해결하는 방법은 무엇입니까? 감사. 다음 코드에서값 unsafePerformSync is scalaz.concurrent.Task의 구성원이 아닙니다. [문자열]
:
import org.http4s._, org.http4s.dsl._
import org.http4s.client.blaze._
import scalaz._, Scalaz._
import scalaz.concurrent.Task
object Client extends App {
val client = PooledHttp1Client()
val httpize = Uri.uri("http://httpize.herokuapp.com")
def post() = {
val req = Request(method = Method.POST, uri = httpize/"post").withBody("hello")
val task = client.expect[String](req)
val x = task.unsafePerformSync
println(x)
}
어느 스카 츠 버전입니까? – rethab