我需要在 HTML 响应中执行 JavaScript。我正在使用 sttp 版本 1.5.12。根据我只需要包含的文档,implicit val sttpBackend = FetchBackend()
但它不起作用。请参阅以下文档:https ://sttp.readthedocs.io/en/latest/backends/javascript/fetch.html
已经包含了对 Maven 的依赖。
<!-- https://mvnrepository.com/artifact/com.softwaremill.sttp/core -->
<dependency>
<groupId>com.softwaremill.sttp</groupId>
<artifactId>core_2.12</artifactId>
<version>1.5.12</version>
</dependency>
例子:
import com.softwaremill.sttp._
implicit val sttpBackend = FetchBackend()
我希望像其他支持的后端一样使用它。日食报告not found : value FetchBackend
任何帮助表示赞赏。