0
  def getScreenCitlByPassConfig: Endpoint[IO, String] = post("mesmerdom" ::
    path("v1") :: path("getScreenCitlBypassConfig") :: multipartAttribute("screenId") ::
    multipartAttribute("platform") :: multipartAttribute("packageName"))

此端点类型为 post 和 multipart 属性。

import io.finch._
class MainTest extends FunSuite {
  test("getConfig"){
      val paramsMap = Map("screenId"->"123456789","platform"-> "android","packageName"->"sample")
      val some = (ScreenCitlByPassController.deleteScreenCitlByPassConfig(Input.delete("/mesmerdom/v1/deleteScreenCitlBypassConfig")
          .withHeaders("Content-Type"-> "multipart/form-data" )
          .withBody(paramsMap)
          .awaitValueUnsafe())
}

当上述端点收到请求时,它返回required params are not found错误发生。

4

0 回答 0