Rest API with JAVA SCRIPT

this worked for me in Js:
It is worth mentioning that at the beginning of the message “text” must contain a space, the same for each line break

  const content = `Requestor: ${Requestor}\nText:${this.issue}\nSubject: ${this.subject}\nid: ${id}\nQueue: ${Queue}`;

  const data = new FormData();
  data.append("content", content);
  const headers = {
    "Content-Type": "application/json",
  };
  axios
    .post(
      `http://URL/REST/1.0/ticket/new?user=USER&pass=PASS`,
      data
    )
    .then((response) => {
      console.log("ID del nuevo ticket:", response.data.id);
      this.$q.notify({
        message: "the Feedback was sent",
        type: "positive",
      });
    })
    .catch((error) => {
      this.$q.notify({
        message: "the Feedback wasn't sent",
        type: "negative",
      });
    });

Interesting. However, you may want to look at using the REST v2 API which provides a RESTful interface. For more information, see: RT::REST2 - RT 5.0.4 Documentation - Best Practical