var data = JSON.stringify({
  "long_url": "http://www.sina.com.cn"
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "http://dlj.bz/api/urlshortener");
xhr.setRequestHeader("content-type", "application/json");

xhr.send(data);