def profile_http
cswap-bend-cli@0.1.0.0 · store.bend:47
import cswap-bend-cli@0.1.0.0/store.bend as Store
import Base
import cswap-bend-cli@0.1.0.0/http.bend as Http
import cswap-bend-cli@0.1.0.0/store/plan.bend as SPlan
47
48
49
50def profile_http(+token: String) -> IO(SPlan.Prof):
51 IO.bind(Result<&2, &2, String, Http.Reply>, SPlan.Prof,
52 Http.request("GET", profile_url(), [("Authorization", "Bearer " ++ token), ("Content-Type", "application/json"), ("User-Agent", "claude-swap/1.0")], "", 5),
53 r => IO.pure(SPlan.Prof, prof_of_reply(r)))