@@ -2,15 +2,15 @@ package com.avsystem.commons
22package jetty .rpc
33
44import java .nio .charset .StandardCharsets
5-
65import com .avsystem .commons .rpc .StandardRPCFramework
76import com .avsystem .commons .serialization .json .{JsonStringInput , JsonStringOutput , RawJson }
87import com .avsystem .commons .serialization .{GenCodec , HasGenCodec }
98import com .typesafe .scalalogging .LazyLogging
9+
1010import javax .servlet .http .{HttpServletRequest , HttpServletResponse }
1111import org .eclipse .jetty .client .HttpClient
1212import org .eclipse .jetty .client .api .Result
13- import org .eclipse .jetty .client .util .{BufferingResponseListener , StringContentProvider }
13+ import org .eclipse .jetty .client .util .{BufferingResponseListener , StringContentProvider , StringRequestContent }
1414import org .eclipse .jetty .http .{HttpMethod , HttpStatus , MimeTypes }
1515import org .eclipse .jetty .server .handler .AbstractHandler
1616import org .eclipse .jetty .server .{Handler , Request }
@@ -68,15 +68,15 @@ object JettyRPCFramework extends StandardRPCFramework with LazyLogging {
6868 }
6969 }
7070
71- val contentProvider = new StringContentProvider (
71+ val content = new StringRequestContent (
7272 MimeTypes .Type .APPLICATION_JSON .asString(),
7373 write(call).s,
7474 StandardCharsets .UTF_8
7575 )
7676
7777 httpClient.newRequest(uri)
7878 .method(method)
79- .content(contentProvider )
79+ .body(content )
8080 .send(listener)
8181
8282 promise.future
0 commit comments