I am using the coinbase dev API to access assets.
To access rates data requires an access key which the API sends back from a POST request.
I am using Flutures and a module called Fetch-Futures instead of just using the promise-based fetch API.
I haven't used Futures before. The response status is ok(200) but all options in the object I get back say resolved next to them (see screenshot).
What does it mean exactly that the type of each key inside the data object is resolved?
Does this mean I should be able to use the values already or do I need an additional step before I can return my access token?
I would like a nice way to access r.json[_value].access_token
.
JS :
function exchangeCodeForAccessToken(tempCode) {
const accessTokenURL = exchangeCode.url(tempCode);
const getAccessToken = url => {
console.log(fetchy);
return fetchy(url, exchangeCode.options)
.map(r => {
console.log(2, r.json);
return r;
})
.value(console.log);
};