payloadToString() {
    if (!this.request.payload) {
      return Promise.resolve(this.request);
    }
    if (this.request.payload instanceof FormData) {
      const data = Object.assign({}, this.request);
      if (!data.payload.entries) {
        data.payload = undefined;
        return Promise.resolve(data);
      }
      return this._createMultipartEntry(data.payload)
      .then((entry) => {
        data.payload = undefined;
        data.multipart = entry;
        return data;
      });
    } else if (this.request.payload instanceof Blob) {
      const data = Object.assign({}, this.request);
      return this._blobToString(data.payload)
      .then((str) => {
        data.payload = undefined;
        data.blob = str;
        return data;
      });
    }
    return Promise.resolve(this.request);
  }
/**
   * Transforms request pyload to string if needed.
   * Note, this returns copy of the object if any transformation is applied.
   *
   * @return {Promise} Promise resolved when payload has been processed.
   */
Transforms request pyload to string if needed.
Note, this returns copy of the object if any transformation is applied.

@return {Promise} Promise resolved when payload has been processed.
Transforms request pyload to string if needed . Note this returns copy of the object if any transformation is applied . @return { Promise } Promise resolved when payload has been processed .
payloadToString() {
    if (!this.request.payload) {
      return Promise.resolve(this.request);
    }
    if (this.request.payload instanceof FormData) {
      const data = Object.assign({}, this.request);
      if (!data.payload.entries) {
        data.payload = undefined;
        return Promise.resolve(data);
      }
      return this._createMultipartEntry(data.payload)
      .then((entry) => {
        data.payload = undefined;
        data.multipart = entry;
        return data;
      });
    } else if (this.request.payload instanceof Blob) {
      const data = Object.assign({}, this.request);
      return this._blobToString(data.payload)
      .then((str) => {
        data.payload = undefined;
        data.blob = str;
        return data;
      });
    }
    return Promise.resolve(this.request);
  }
payloadToString ( ) { if ( ! this . request . payload ) { return Promise . resolve ( this . request ) ; } if ( this . request . payload instanceof FormData ) { const data = Object . assign ( { } , this . request ) ; if ( ! data . payload . entries ) { data . payload = undefined ; return Promise . resolve ( data ) ; } return this . _createMultipartEntry ( data . payload ) . then ( ( entry ) => { data . payload = undefined ; data . multipart = entry ; return data ; } ) ; } else if ( this . request . payload instanceof Blob ) { const data = Object . assign ( { } , this . request ) ; return this . _blobToString ( data . payload ) . then ( ( str ) => { data . payload = undefined ; data . blob = str ; return data ; } ) ; } return Promise . resolve ( this . request ) ; }
Transforms request pyload to string if needed.
Transforms request pyload to string if needed .