send()

in showcase/test.js [210:232]


  send() {
    var text = document.getElementById("myText").value;
    console.log("checking type!");
    console.log(typeof text);
    var self = this;
    var input = {
      message: text,
      type: "text/plain",
      metadata: { requestContext: "oye balle!!" }
    };
    self.chatController
      .sendMessage(input)
      .then(function(response) {
        console.log("sentSuccess: " + text);
        console.log(response);
      })
      .catch(function(error) {
        console.log("error");
        console.log(error);
        console.log("error");
      });
    console.log("sent: " + text);
  }