SOLVED

Flowboost Community Edition and Marketo APIs

Go to solution
SanfordWhiteman
Level 10 - Community Moderator

Re: Flowboost Community Edition and Marketo APIs

I’d have to see your code. FBHttp is supported with any subscription, and it’s used w/Community by many users.

Worcesterharry
Level 2

Re: Flowboost Community Edition and Marketo APIs

FBHttp works perfectly, it's awesome. Just for some reason within promises defining it as a variable works, while without causes an unhandled promise error due to FBHttp being undefined. I don't know why, all I care is it works with one more variable defined which obviously is no issue to add.

SanfordWhiteman
Level 10 - Community Moderator

Re: Flowboost Community Edition and Marketo APIs


FBHttp works perfectly, it's awesome. Just for some reason within promises defining it as a variable works, while without causes an unhandled promise error due to FBHttp being undefined. 

Can you post the smallest possible code that reproduces it?


This code, based on some earlier code in the thread, works fine:

let p1 = new Promise((resolve, reject) => {
    FBHttp.fetch( "https://example.com/one.json" )
   .then( resp =>
      FBHttp.fetch( "https://example.com/two.json" )
      .then( resolve )
    )
   .catch( reject )
});
 
Promise.all([p1])
.then( resps => Promise.all(resps.map( resp => resp.json() )) )
.then( success )
.catch( failure );