src/lib/Internet.js
/**
   * @param {boolean=} withPayload Whether the request can have a payload (body) or not. When not set it returns one of all possible.
   * @returns {string} Pick on of a default HTTP methods.
   */
@param {boolean=} withPayload Whether the request can have a payload (body) or not. When not set it returns one of all possible.
@returns {string} Pick on of a default HTTP methods.
@param { boolean = } withPayload Whether the request can have a payload ( body ) or not . When not set it returns one of all possible . @returns { string } Pick on of a default HTTP methods .
httpMethod(withPayload) {
    const payload = ['POST', 'PUT', 'DELETE', 'PATCH', 'OPTIONS'];
    const nonPayload = ['GET', 'HEAD'];
    if (typeof withPayload === 'boolean') {
      const pool = withPayload ? payload : nonPayload;
      return this[randomValue].pickOne(pool);
    }
    return this[randomValue].pickOne(payload.concat(nonPayload));
  }
httpMethod ( withPayload ) { const payload = [ 'POST' , 'PUT' , 'DELETE' , 'PATCH' , 'OPTIONS' ] ; const nonPayload = [ 'GET' , 'HEAD' ] ; if ( typeof withPayload === 'boolean' ) { const pool = withPayload ? payload : nonPayload ; return this [ randomValue ] . pickOne ( pool ) ; } return this [ randomValue ] . pickOne ( payload . concat ( nonPayload ) ) ; }
@param {boolean=} withPayload Whether the request can have a payload (body) or not.
@param { boolean = } withPayload Whether the request can have a payload ( body ) or not .