Skip to content

Commit

Permalink
Merge pull request #481 from AVSystem/jetty10
Browse files Browse the repository at this point in the history
Upgrade Jetty to 10.x series
  • Loading branch information
ddworak committed Aug 31, 2023
2 parents dbfa545 + 859b362 commit 06138a1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ package com.avsystem.commons
package jetty.rpc

import java.nio.charset.StandardCharsets

import com.avsystem.commons.rpc.StandardRPCFramework
import com.avsystem.commons.serialization.json.{JsonStringInput, JsonStringOutput, RawJson}
import com.avsystem.commons.serialization.{GenCodec, HasGenCodec}
import com.typesafe.scalalogging.LazyLogging

import javax.servlet.http.{HttpServletRequest, HttpServletResponse}
import org.eclipse.jetty.client.HttpClient
import org.eclipse.jetty.client.api.Result
import org.eclipse.jetty.client.util.{BufferingResponseListener, StringContentProvider}
import org.eclipse.jetty.client.util.{BufferingResponseListener, StringContentProvider, StringRequestContent}
import org.eclipse.jetty.http.{HttpMethod, HttpStatus, MimeTypes}
import org.eclipse.jetty.server.handler.AbstractHandler
import org.eclipse.jetty.server.{Handler, Request}
Expand Down Expand Up @@ -68,15 +68,15 @@ object JettyRPCFramework extends StandardRPCFramework with LazyLogging {
}
}

val contentProvider = new StringContentProvider(
val content = new StringRequestContent(
MimeTypes.Type.APPLICATION_JSON.asString(),
write(call).s,
StandardCharsets.UTF_8
)

httpClient.newRequest(uri)
.method(method)
.content(contentProvider)
.body(content)
.send(listener)

promise.future
Expand Down
2 changes: 1 addition & 1 deletion project/Commons.scala
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ object Commons extends ProjectGroup("commons") {
val scalatestVersion = "3.2.16"
val scalatestplusScalacheckVersion = "3.2.14.0"
val scalacheckVersion = "1.17.0"
val jettyVersion = "9.4.51.v20230217"
val jettyVersion = "10.0.16"
val mongoVersion = "4.10.2"
val springVersion = "5.3.29"
val typesafeConfigVersion = "1.4.2"
Expand Down

0 comments on commit 06138a1

Please sign in to comment.