AdamChlupacek on upgrade-to-fs2.3
Address review comments, remove… (compare)
AdamChlupacek on upgrade-to-fs2.3
Fix travis dependencies. (compare)
AdamChlupacek on 0.5
Fix travis dependencies. (compare)
AdamChlupacek on upgrade-to-fs2.3
Setting version to 0.4.0-SNAPSH… Updated to fs2 1.0.0 final Fixes #29 and 16 more (compare)
AdamChlupacek on 0.5
Merge branch 'series/0.4' of gi… (compare)
AdamChlupacek on upgrade-to-fs2.3
Migrate fs2-http to fs2 2.3.0 +… (compare)
HttpCredentials.DigestHttpCredentials
header in form of DigestHttpCredentials(mpPlaintextCredentials.text, Map.empty)
this should be encoded into the form you require.
Bot
before the thing
protocol-http
explicitly?
val catsCoreVersion = "2.0.0-M1"
val catsEffectVersion = "2.0.0-M1"
val fs2CoreVersion = "1.0.4"
val fs2HttpVersion = "0.4.1"
val protocolHttpVersion = "0.3.17"
val circeVersion = "0.12.0-M1"
val circeFs2Version = "0.11.0"
val spireVersion = "0.16.1"
lazy val discocat = (project in file(".")).settings (
organization := "org.discordscala",
name := "discocat",
version := "0.1.0",
scalaVersion := "2.12.8",
libraryDependencies ++= Seq(
"org.typelevel" %% "cats-core" % catsCoreVersion,
"org.typelevel" %% "cats-effect" % catsEffectVersion,
"co.fs2" %% "fs2-core" % fs2CoreVersion,
"com.spinoco" %% "fs2-http" % fs2HttpVersion,
"com.spinoco" %% "protocol-http" % protocolHttpVersion,
"io.circe" %% "circe-core" % circeVersion,
"io.circe" %% "circe-generic" % circeVersion,
"io.circe" %% "circe-generic-extras" % circeVersion,
"io.circe" %% "circe-parser" % circeVersion,
"io.circe" %% "circe-fs2" % circeFs2Version,
"org.typelevel" %% "spire" % spireVersion,
),
scalacOptions ++= Seq(
"-unchecked",
"-deprecation",
"-feature",
"-Ypartial-unification",
"-language:higherKinds",
),
addCompilerPlugin(
"org.scalamacros" % "paradise" % "2.1.1" cross CrossVersion.full
),
)
protocol-http
on maven
java.lang.ClassCastException: spinoco.protocol.http.header.GenericHeader cannot be cast to spinoco.protocol.http.header.Authorization
at scodec.Codec$$anon$2.encode(Codec.scala:200)
at scodec.Codec$$anon$7.encode(Codec.scala:400)
at scodec.EncoderFunctions.$anonfun$encodeBoth$1(Encoder.scala:111)
at scodec.Attempt$Successful.flatMap(Attempt.scala:94)
at scodec.EncoderFunctions.encodeBoth(Encoder.scala:110)
at scodec.EncoderFunctions.encodeBoth$(Encoder.scala:109)
at scodec.Codec$.encodeBoth(Codec.scala:460)
at scodec.codecs.TupleCodec.encode(TupleCodec.scala:12)
at scodec.codecs.TupleCodec.encode(TupleCodec.scala:6)
at scodec.Codec$$anon$2.encode(Codec.scala:200)
at scodec.EncoderFunctions.$anonfun$encodeBoth$1(Encoder.scala:111)
at scodec.Attempt$Successful.flatMap(Attempt.scala:94)
at scodec.EncoderFunctions.encodeBoth(Encoder.scala:110)
at scodec.EncoderFunctions.encodeBoth$(Encoder.scala:109)
at scodec.Codec$.encodeBoth(Codec.scala:460)
at scodec.Codec$$anon$3.encode(Codec.scala:303)
at scodec.Codec$$anon$3.encode(Codec.scala:301)
at scodec.Codec$$anon$2.encode(Codec.scala:200)
at scodec.Codec$$anon$7.encode(Codec.scala:400)
at spinoco.protocol.http.codec.helper$.go$2(helper.scala:162)
at spinoco.protocol.http.codec.helper$.$anonfun$parametrizedN$1(helper.scala:168)
at scodec.Attempt$Successful.flatMap(Attempt.scala:94)
HttpHeaderCodec.codec
, so that you can actually override the default coded for the header.
hi everyone,
I am trying to transform the stream response to an effect response like below
httpClient.request(request).compile.lastOrError
I am trying to keep the http responses as effect if possible. I want to use fs2-http
for websocket as well, that's why even though in some places i need to lift it to stream it makes more sense to me to keep it as effect first. But when I do that I am having the exception below on any http request.
java.nio.channels.ClosedChannelException: null
at java.base/sun.nio.ch.AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:234)
at java.base/sun.nio.ch.AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:298)
at fs2.io.tcp.Socket$.$anonfun$apply$3(Socket.scala:283)
at fs2.io.tcp.Socket$.$anonfun$apply$3$adapted(Socket.scala:276)
maybe it is not intended to evaluate that way, is it possible to use this way?