Skip to end of metadata
Go to start of metadata

Problem:


When I am trying to make an API call the response does not have a form of a JSON document. I receive a mixture of HTML and JavaScript:


Response Code
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <script type="text/javascript">
    window["adrum-app-key"] = "EUM-AAB-AUA";
    window['adrum-start-time'] = new Date().getTime();
</script>
    <script>(function (config) {
    (function (xd) {
        xd.enable = true;
    })(config.xd || (config.xd = {}));
})(window['adrum-config'] || (window['adrum-config'] = {}));</script>
    <script type="text/javascript" src="/statics/app-dynamics/eu/adrum.js"></script>
    <script type="text/javascript">
    if (window.ADRUM && document.documentMode) {
        ADRUM.command("addUserData", "Document-Mode", document.documentMode);
    }
</script>
    <script type="text/javascript">window._trackJs = {
    token: '9ea0d60732464c82aa90ecd0e1a2b2ca',
    application: "signavio-production"
};
</script>
    <script type="text/javascript" src="https://d2zah9y47r7bi2.cloudfront.net/releases/current/tracker.js"></script>
    <!--[if IE]>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <![endif]-->
    <meta name="version" content="12.0.4" />
    <link rel="shortcut icon" href="/images/banners/bock2.ico" type="image/x-icon"/>
    <title>Glossar | Signavio</title>
    <!-- CSS -->
    <link type="text/css" rel="stylesheet" href="/client/libs/ext/resources/css/ext-all.css?version=12.0.4"/>
    <link type="text/css" rel="stylesheet" href="/client/libs/ext/resources/css/xtheme-darkgray.css?version=12.0.4"/>
    <link type="text/css" rel="stylesheet" href="/libs/ux.css?version=12.0.4"/>
    <link type="text/css" rel="stylesheet" href="/client/glossary/default.css?version=12.0.4"/>
    <!-- Libraries -->
    <script type="text/javascript" src="/client/libs/iscroll.js"></script>
    <script type="text/javascript" src="/client/libs/prototype.js"></script>
    <script type="text/javascript" src="/client/libs/ext/ext.js"></script>
    <script type="text/javascript" src="/client/glossary/glossary.js?version=12.0.4"></script>
</head>
<body class="x-redesign-license-premium splash-visible">
    <div class="mask-logo">
        <div class="header">
            <img src="/client/libs/ext/resources/images/default/s.gif" class="signavio-logo">
    
        </div>
        <div class="loader">
            <div class="value"></div>
        </div>
        <div class="version"></div>
        <div class="logo logo-with-text">
            <img src="/client/libs/ext/resources/images/default/s.gif" class="glossary">
            <span class="text">Glossar</span>
        </div>
    </div>
</body>
</html>




Solution:


Please check the request headers. The following headers have to be set as follows:

  • Accept = application/json
  • Content-Type = application/x-www-form-urlencoded
  • Cache-Control = no-cache