【发布时间】:2020-10-12 13:49:19
【问题描述】:
我正在尝试检查发送请求后收到的数据,为此我需要编写一个测试来确保它。
这是处理数据的三个函数。
fetchConfigs : Cmd Msg
fetchConfigs =
Http.get
{ url = "http://localhost:8080/api/sso/configs"
, expect = Http.expectJson GotConfigs responseDecoder
}
responseDecoder : Decoder Config
responseDecoder =
map2 Config
(field "identifier" string)
(field "ssoType" int)
type Msg
= GotConfigs (Result Http.Error Config)
【问题讨论】:
标签: elm