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",
});
});