code: function(payload){
      if (!Array.isArray(payload)) payload = [payload];
      var options = {
        // events must be sent with POST
        method: "POST",
        host: this.origin,
        path: this.endpoint +  "?access_token=" + this.access_token,
        headers: {
          'Content-Type': 'application/json'
        },
        body:JSON.stringify(payload) //events are arrays
      }
      return options
    }
docs: Get http request options
  @private
  @param {*} payload