Developer portal returning incorrect response

Hi Team,

API Proxy returning response as expected but developer portal returning incorrect response(or it might not connecting to proxy).

When i execute APIs in Developer portal it is always giving 200 response for valid/invalid input parameters with below random generic html response with status code 200 but that is not correct.

<!doctype html>
<html>
<head>
<meta charset="utf-8">

<!-- Ensure mobile displays do not scale down content -->
<meta name="viewport" content="width=device-width,initial-scale=1">

<!-- Default to blank favicon. Overwritten by real favicon if present -->
<link id="favicon" rel="icon" href="data:;base64,iVBORw0KGgo=">

<title></title>
<base href="/">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">

<script>
/**
* Creates, kicks off, and returns an HTTP GET request
* @Former Community Member url where to send the request
* @Former Community Member onCompletion callback to execute when the request is complete. defaults to no-op
* @return {XMLHttpRequest}
*/
function getRequest(url, onCompletion = () => {}) {
const req = new XMLHttpRequest();
req.open('GET', url);
req.onreadystatechange = () => {
if (req.readyState === XMLHttpRequest.DONE) {
onCompletion(req);
}
}
req.send()
return req;
}

getRequest('/siteid', req => {
const siteId = req.responseText;
const baseUrl = '/portals/api/sites/' + siteId + '/liveportal/';
window.preloadRequests = {
SITE_MAP: getRequest(baseUrl + 'sitemap'),
MENUS: getRequest(baseUrl + 'menus'),
};
});
</script>
</head>
<body>
<app></app>
<script src="/js/runtime.5d5a916a16a0bf4f7725.js" defer></script><script src="/js/polyfills.7c8f9aca9ee2336e0365.js" defer></script><script src="/js/main.860d5af4e81794c26be5.js" defer></script></body>
</html>

 

is this happening due to  API Execute request in the portal is not reaching to API Proxy??

or 

have I missed any settings in the portal..?

please suggest me.

0 1 108
1 REPLY 1

I think this is a duplicate question. I answered in the other thread.