// call the api
const result = await api.reverse(
{
contentType: "text/plain",
value: () => "someValue",
},
{},
{ baseUrl: "http://url.url"}
);
// verify response status
if (result.status !== 200) {
throw new Error("unexpected status");
}
// get the result
const resultValue = await result.value();
instead of
we should be able to do