首页 > 解决方案 > Curl 命令错误:返回类似于 javascript 的内容

问题描述

现在,我正在尝试使用 curl 命令并检查我的代码是否正常工作。而且我认为我最后一次尝试但这次不知何故它不起作用,返回的结果看起来像原始的 html 和 Javascript。

我猜 curl 命令是错误的,或者可能有什么问题。

请给我任何建议。

这是我尝试过的。

curl "http://localhost:3000/api/v1/internal/items/209?api_token=uabsubsfasjbbaljbd" -X DELETE

或者

curl -X delete "http://localhost:3000/api/v1/internal/items/209?api_token=uabsubsfasjbbaljbd"

错误看起来像这样

    case 37: case 38: case 39: case 40: // disable using arrow keys on completing
      return true;
  }

  return false;
};

Autocomplete.prototype.trim = function(from, needToTrim) {
  var self = this;
  var num = 5;

  if (this.elements.length > num) {
    (0 < from ? removeClass : addClass)(this.prefix, 'trimmed');
    (from + num < this.elements.length ? removeClass : addClass)(this.suffix, 'trimmed');
  } else {
    addClass(this.prefix, 'trimmed');
    addClass(this.suffix, 'trimmed');
  }

  function iterate(x) {
    for (var i = 0; i < num; ++i, ++x) if (0 <= x && x < self.elements.length) {
      toggleClass(self.elements[x], 'trimmed');
    }
  }


  }

  resizerElement.addEventListener('mousedown', function(event) {
    function recordConsoleElementHeight(event) {
      resizerElement.removeEventListener('mouseup', recordConsoleElementHeight);

      var currentConsoleElementHeight = consoleElement.offsetHeight;
      setContainerElementBottomMargin(currentConsoleElementHeight);
    }

    resizerElement.addEventListener('mouseup', recordConsoleElementHeight);
  });
});

}).call(this);
</script>


</body>
</html>

谢谢你。

标签: curl

解决方案


推荐阅读