Not tested enough, but I'm throwing the idea out there.
This is WIP, and uses an external package for building requests.
We could technically copy over the external code, or generate it alongside the client, but I thought relying on a battle tested library was worth it, even though it makes for an extra dependency.
The generated code is decent. The only thing I'm unhappy about is how API errors don't get coalesced into an error, because we would have to figure out what errors are (500s+ only?).
We could also pattern match on ($error^ i). It's still decent to work with though.
Not tested enough, but I'm throwing the idea out there.
This is WIP, and uses an external package for building requests.
We could technically copy over the external code, or generate it alongside the client, but I thought relying on a battle tested library was worth it, even though it makes for an extra dependency.
The generated code is decent. The only thing I'm unhappy about is how API errors don't get coalesced into an
error
, because we would have to figure out what errors are (500s+ only?).We could also pattern match on (
$error^
i). It's still decent to work with though.