【发布时间】:2017-11-06 04:35:42
【问题描述】:
我是榆树新手, 我有一个登录 api,它在它的 hedears 中返回一个 JWT 令牌
curl http://localhost:4000/api/login?email=bob@example&password=1234
回复:
HTTP/1.1 200 OK
authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXyLp0aSI6ImefP2GOWEFYWM47ig2W6nrhw
x-expires: 1499255103
content-type: text/plain; charset=utf-8
success
现在我正在尝试编写一个函数,该函数将发送请求并从 elm 的标头中返回令牌
authUser =
Http.send "http://localhost:4000/api/login?email=bob@example&password=1234"
如何以简单的方式做到这一点?
【问题讨论】:
标签: elm