src/lib/http/HttpPayload.js
/**
   * Generates a random payload data for given mime type.
   * 
   * @param {string=} mime The ime type. When not set it picks one.
   */
Generates a random payload data for given mime type.

@param {string=} mime The ime type. When not set it picks one.
Generates a random payload data for given mime type . @param { string = } mime The ime type . When not set it picks one .
payload(mime) {
    const ct = mime || this[randomValue].pickOne(['application/x-www-form-urlencoded', 'application/json', 'application/xml']);
    switch (ct) {
      case 'application/x-www-form-urlencoded':
        return this.urlEncoded();
      case 'application/json':
        return this.json();
      case 'application/xml':
        return this.xml();
      default:
        return this[loremValue].paragraph();
    }
  }
payload ( mime ) { const ct = mime || this [ randomValue ] . pickOne ( [ 'application/x-www-form-urlencoded' , 'application/json' , 'application/xml' ] ) ; switch ( ct ) { case 'application/x-www-form-urlencoded' : return this . urlEncoded ( ) ; case 'application/json' : return this . json ( ) ; case 'application/xml' : return this . xml ( ) ; default : return this [ loremValue ] . paragraph ( ) ; } }
Generates a random payload data for given mime type.
Generates a random payload data for given mime type .