@@ -2,15 +2,15 @@ package com.avsystem.commons
2
2
package jetty .rpc
3
3
4
4
import java .nio .charset .StandardCharsets
5
-
6
5
import com .avsystem .commons .rpc .StandardRPCFramework
7
6
import com .avsystem .commons .serialization .json .{JsonStringInput , JsonStringOutput , RawJson }
8
7
import com .avsystem .commons .serialization .{GenCodec , HasGenCodec }
9
8
import com .typesafe .scalalogging .LazyLogging
9
+
10
10
import javax .servlet .http .{HttpServletRequest , HttpServletResponse }
11
11
import org .eclipse .jetty .client .HttpClient
12
12
import 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 }
14
14
import org .eclipse .jetty .http .{HttpMethod , HttpStatus , MimeTypes }
15
15
import org .eclipse .jetty .server .handler .AbstractHandler
16
16
import org .eclipse .jetty .server .{Handler , Request }
@@ -68,15 +68,15 @@ object JettyRPCFramework extends StandardRPCFramework with LazyLogging {
68
68
}
69
69
}
70
70
71
- val contentProvider = new StringContentProvider (
71
+ val content = new StringRequestContent (
72
72
MimeTypes .Type .APPLICATION_JSON .asString(),
73
73
write(call).s,
74
74
StandardCharsets .UTF_8
75
75
)
76
76
77
77
httpClient.newRequest(uri)
78
78
.method(method)
79
- .content(contentProvider )
79
+ .body(content )
80
80
.send(listener)
81
81
82
82
promise.future
0 commit comments