function request(url, payload) {
  return fetch(url, {
    method: 'POST',
    // set to 1000 b/c no response needed
    timeout: 1000,
    body: JSON.stringify(payload),
  })
  .then((response) => {
    if (response.status === 404) {
      return BbPromise.reject('404 api not found');
    }
    return response.json();
  })
  .then((res) => BbPromise.resolve(res))
  .catch((e) => BbPromise.resolve(e));
}
function request(url, payload) {
  return fetch(url, {
    method: 'POST',
    // set to 1000 b/c no response needed
    timeout: 1000,
    body: JSON.stringify(payload),
  })
  .then((response) => {
    if (response.status === 404) {
      return BbPromise.reject('404 api not found');
    }
    return response.json();
  })
  .then((res) => BbPromise.resolve(res))
  .catch((e) => BbPromise.resolve(e));
}
function request ( url , payload ) { return fetch ( url , { method : 'POST' , // set to 1000 b/c no response needed timeout : 1000 , body : JSON . stringify ( payload ) , } ) . then ( ( response ) => { if ( response . status === 404 ) { return BbPromise . reject ( '404 api not found' ) ; } return response . json ( ) ; } ) . then ( ( res ) => BbPromise . resolve ( res ) ) . catch ( ( e ) => BbPromise . resolve ( e ) ) ; }
/* note tracking swallows errors
/ * note tracking swallows errors
Request an image