Add airframe-http-client implementation for Scala.js:
def get[X](path:String): Future[X] = macro ...
This macro will generate code like this:
AjaxUtil.call("/v1/query") { response =>
val codec = MessageCodec.of[Seq[PrestoQuery]]
val data = codec.fromMsgPack(response)
Future(data)
}
To do so:
- We need to extract common interfaces in airframe-http for Scala and Scala.js.
- Some package relocation will be necessary (e.g., HttpClient might need to move to wvlet.airframe.http.client)
- Use cross Scala build for airframe-http
Add airframe-http-client implementation for Scala.js:
This macro will generate code like this:
To do so: