File tree 2 files changed +8
-1
lines changed
airframe-http-codegen/src/main/scala/wvlet/airframe/http/codegen 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -175,6 +175,13 @@ object HttpClientIR extends LogSupport {
175
175
) extends ClientCodeIR {
176
176
def typeArgString =
177
177
typeArgs
178
+ .map(arg =>
179
+ if (arg.rawType.isAssignableFrom(classOf [Rx [_]]) && arg.typeArgs.size > 0 )
180
+ // Extract Rx element type
181
+ arg.typeArgs(0 )
182
+ else
183
+ arg
184
+ )
178
185
.map(arg => HttpClientGenerator .fullTypeNameOf(arg))
179
186
.mkString(" , " )
180
187
def clientMethodName = {
Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ object RPCClientGenerator extends HttpClientGenerator {
164
164
m.httpMethod match {
165
165
case HttpMethod .GET =>
166
166
s """ def ${m.name}( ${inputArgs.mkString(" , " )}): ${returnType} = {
167
- | client.readAs[ ${m.returnType.fullTypeName }](Http.GET(s" ${m.path}"))
167
+ | client.readAs[ ${returnElementType }](Http.GET(s" ${m.path}"))
168
168
|} """ .stripMargin
169
169
case _ =>
170
170
val args = Seq .newBuilder[String ]
You can’t perform that action at this time.
0 commit comments