Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

how to see line number in gatway script

var hm = require('header-metadata');
var sm = require('service-metadata');
var um = require('url');
hm.current.set('content-type','application/xml');
hm.current.set('accept','application/json');

// create a context named `TRAXQT` if not exist
var ctx = session.name('DummyTest') || session.createContext('TRAXQT');

/* ----------------------------------------------------- */
/* setup variables from service context                  */
/* ----------------------------------------------------- */
var domain = sm.getVar('var://service/domain-name');
var iURL = sm.getVar('var://service/URL-in');

/* ----------------------------------------------------- */
/* setup the logger based on which domain we are in      */
/* ----------------------------------------------------- */
var domain = sm.getVar('var://service/domain-name');
//var logger = console.options({'category':'LogCat_TRAXQT'});

console.log('Domain->'+domain)
if (domain == "default") logger = console.log('Inside default domain');

//console.log(hm.current.'content-type');
//console.log(hm.original.'content-type');
//console.log(hm.response.'content-type');

//var urlobj = um.parse("http://dummy.restapiexample.com/api/v1/employees"); //um.parse(iURL);

//logger.debug("urlobj[%s] pathname[%s]", urlobj, urlobj.pathname);

//var route = um.format(urlobj);
//sm.setVar('var://service/routing-url', route);
//logger.info("Route[%s]", route);
Comment

PREVIOUS NEXT
Code Example
Javascript :: how to new tab disable after hit enter in javascript 
Javascript :: Textbelt FOR mac 
Javascript :: rest operator javascript 
Javascript :: 4. You want to print the incremental count each time you instantiate a object using new in JS 
Javascript :: react padding at bottom svg 
Javascript :: jQuery Aniview 
Javascript :: slack icon emoji for alertmanager 
Javascript :: what is amqp10 policy nodejs 
Javascript :: remove etag express 
Javascript :: How to get length of string in javascript without using native length method 
Javascript :: not qual in mongoose 
Javascript :: send props from one component to another on button click 
Javascript :: angular browser detector 
Javascript :: reactive forms angular conditional disabling 
Javascript :: how to check record successfully delete in mongodb node js 
Javascript :: resequency array by atributo 
Javascript :: div gets pulled to corner when resizing 
Javascript :: discord js presence update 
Javascript :: how to know if express is intalled 
Javascript :: react native multiple touchableopacity 
Javascript :: jsdom nodelist empty array why 
Javascript :: Ambobulamblation 
Javascript :: const toogleState = (index) ={ console.log(index); } 
Javascript :: enviar datos de un formulario por correo electronico 
Javascript :: react native kesatore 
Javascript :: Extract JSON from http page request 
Javascript :: how to open same project on different devices vue js 
Javascript :: oracle apex interactive grid set record field readonly 
Javascript :: jquerry shorthand for fetch 
Javascript :: fecha javascript mes de 2 digitos 
ADD CONTENT
Topic
Content
Source link
Name
4+7 =