www.cosmobeautyseoul.com Open in urlscan Pro
115.68.114.28  Public Scan

Submitted URL: http://www.cosmobeautyseoul.com/_master/js/api_server.js
Effective URL: https://www.cosmobeautyseoul.com/_master/js/api_server.js
Submission: On April 24 via manual from US — Scanned from DE

Form analysis 0 forms found in the DOM

Text Content

document.write("<script src='/jsp/js/vue.js/axios.min.js'></script>");
document.write("<script src='/jsp/js/vue.js/es6-promise.min.js'></script>");
document.write("<script src='/jsp/js/vue.js/es6-promise.auto.min.js'></script>");

var isLocal = (location.port && '' !== location.port);
var endPointUrl = (isLocal ? 'http://127.0.0.1:8086' : 'https://api.micehub.com');

API_SERVER = {
    request: function (method, url, params, onSuccess, onFail) {
        axios({
            method: method,
            headers: { 'MHX_DOMAIN':  location.hostname },
            url: endPointUrl + url,
            dataType: 'json',
            data: params

        }).then(function(response) {
            if(typeof onSuccess === 'function'){
                onSuccess(response);
            }
        }).catch(function(error){
            console.error(error);
            if(!isLocal && typeof onFail === 'function'){
                onFail();
            }
        })
    },
}