Skip to content

Commit

Permalink
More hacks
Browse files Browse the repository at this point in the history
  • Loading branch information
adamw committed Oct 2, 2024
1 parent bb8809e commit d6a8f70
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ object AsyncHttpClientZioBackend {
new AsyncHttpClientZioBackend(runtime, asyncHttpClient, closeClient, customizeRequest, webSocketBufferCapacity)
)

// work-around for "You must not use an intersection type, yet have provided SttpBackend[Task, ZioStreams & WebSockets]", #2244
implicit val sttpClientTag: Tag[SttpBackend[Task, ZioStreams with WebSockets]] =
Tag.materialize[SttpBackend[Task, ZioStreams]].asInstanceOf[Tag[SttpBackend[Task, ZioStreams with WebSockets]]]

def apply(
options: SttpBackendOptions = SttpBackendOptions.Default,
customizeRequest: BoundRequestBuilder => BoundRequestBuilder = identity,
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scalanative/sttp/client3/curl/CurlApi.scala
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ private[client3] object CurlApi {
def withEncoding(encoding: String)(implicit zone: Zone): CurlCode = CCurl.mimeEncoder(handle, toCString(encoding))

def withData(data: String, datasize: Long = CurlZeroTerminated)(implicit zone: Zone): CurlCode =
CCurl.mimeData(handle, toCString(data), datasize.toULong)
CCurl.mimeData(handle, toCString(data), datasize.toCSize)

def withFileData(filename: String)(implicit zone: Zone): CurlCode = CCurl.mimeFiledata(handle, toCString(filename))

Expand Down

0 comments on commit d6a8f70

Please sign in to comment.