1 Reply Latest reply on Apr 6, 2017 10:42 AM by mhamilton RSS
    mhamilton Newbie

    Construction of a derived URL

    Hi

     

    I am trying to use a GET http request using a constructed URL which uses differing parameters, fields, values, etc which are passed to it.

     

    "http://"+me.MDSIP+":"+me.MDSPORT+"/"+BinID+"/binevent/"+BinEvent+"/"+BinDate;

     

    I intended on using the ContentLoaderFunctions function to pass the URL but I am struggling to place this value into the url field without errors?

     

    My code is below.  currently I receive a http 400 response due to the fact that the url i have in place isnt the variable callurl but the one entered  as http://192.168.40.113:80

     

    var calledurl="http://"+me.MDSIP+":"+me.MDSPORT+"/"+BinID+"/binevent/"+BinEvent+"/"+BinDate;

     

     

    try{

    var params = {

      proxyScheme: undefined /* STRING */,

      headers: undefined /* JSON */,

      ignoreSSLErrors: undefined /* BOOLEAN */,

      useNTLM: undefined /* BOOLEAN */,

      workstation: undefined /* STRING */,

      useProxy: undefined /* BOOLEAN */,

      withCookies: undefined /* BOOLEAN */,

      proxyHost: undefined /* STRING */,

        url: "http://192.168.40.113:80" /* STRING */,

      timeout: 5 /* NUMBER */,

        proxyPort: undefined /* INTEGER */,

      password: undefined /* STRING */,

      domain: undefined /* STRING */,

      username: undefined /* STRING */

    };

     

     

    // result: STRING

    var result = Resources["ContentLoaderFunctions"].GetText(params);

     

     

    }

    catch(err)

    {

        logger.warn(err+" called url is: "+calledurl);

    }

     

     

    any help appreciated