test 3

HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/mootools/1.6.0/mootools-core.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mootools-more/1.6.0/mootools-more-compressed.js"></script>
<h3>HTML:</h3>
<p id="result"></p>

CSS

p {
  padding: 10px;
}

p {
  margin: 5px;
  border: 1px dotted #999;
}

JavaScript

fetch("/echo/html/", {
  method: "POST",
  headers: {
    "Content-Type": "application/x-www-form-urlencoded; charset=utf-8"
  },
  body: "html=<a href='#'>hello world</a>"
})
.then((response) => response.text())
.then((responseText) => {
  document.querySelector("#result").innerHTML = responseText
})
.catch((error) => {
  console.error(error)
})