static fetchAddNewReview(reviewObject) {
    const requestParams = {
      method: 'POST',
      body: JSON.stringify(reviewObject),
      headers: new Headers({
        'Content-Type': 'application/json'
      })
    };
    return fetch(`${DBHelper.DATABASE_URL}reviews`, requestParams)
      .then(response => {
        if (response.status === 201) {
          return response.json();
        } else { // Oops!. Got an error from server.
          console.error(`Request failed. Review was not created.`);
        }
      })
  }
/**
   * Fetch POST request to add new review to backend
   */
Fetch POST request to add new review to backend
Fetch POST request to add new review to backend
static fetchAddNewReview(reviewObject) {
    const requestParams = {
      method: 'POST',
      body: JSON.stringify(reviewObject),
      headers: new Headers({
        'Content-Type': 'application/json'
      })
    };
    return fetch(`${DBHelper.DATABASE_URL}reviews`, requestParams)
      .then(response => {
        if (response.status === 201) {
          return response.json();
        } else { 
          console.error(`Request failed. Review was not created.`);
        }
      })
  }
static fetchAddNewReview ( reviewObject ) { const requestParams = { method : 'POST' , body : JSON . stringify ( reviewObject ) , headers : new Headers ( { 'Content-Type' : 'application/json' } ) } ; return fetch ( ` ${ DBHelper . DATABASE_URL } ` , requestParams ) . then ( response => { if ( response . status === 201 ) { return response . json ( ) ; } else { console . error ( ` ` ) ; } } ) }
Fetch POST request to add new review to backend
Fetch POST request to add new review to backend
// Oops!. Got an error from server.