src/index.js
function presignRequest (presignUrl, token) {
  return new Promise((resolve, reject) => {
    request
      .post(presignUrl)
      .set({
        'Accept': 'application/json',
        'Content-Type': 'application/json',
        'X-CSRF-Token': token
      })
      .end((err, res) => {
        // throw a custom error message
        if (err) return reject(customError('presignRequest', err))
        resolve(res)
      })
  })
}
function presignRequest (presignUrl, token) {
  return new Promise((resolve, reject) => {
    request
      .post(presignUrl)
      .set({
        'Accept': 'application/json',
        'Content-Type': 'application/json',
        'X-CSRF-Token': token
      })
      .end((err, res) => {
        // throw a custom error message
        if (err) return reject(customError('presignRequest', err))
        resolve(res)
      })
  })
}
function presignRequest ( presignUrl , token ) { return new Promise ( ( resolve , reject ) => { request . post ( presignUrl ) . set ( { 'Accept' : 'application/json' , 'Content-Type' : 'application/json' , 'X-CSRF-Token' : token } ) . end ( ( err , res ) => { // throw a custom error message if ( err ) return reject ( customError ( 'presignRequest' , err ) ) resolve ( res ) } ) } ) }
presignRequest
Perform an XHR request and Resolve or Reject
@param  {String} presignUrl
@param  {String} token
@param  {Promise}
presignRequest Perform an XHR request and Resolve or Reject