Uploaded image for project: 'JITL - JobScheduler Integrated Template Library'
  1. JITL - JobScheduler Integrated Template Library
  2. JITL-539

Method addHeader in JobSchedulerRestClient should be static

    XMLWordPrintable

    Details

    • Type: Feature
    • Status: Released (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.12
    • Fix Version/s: 1.12.9
    • Labels:
      None

      Description

      Current Situation

      The JobSchedulerRestClient class can be used in JavaScript jobs in a static way like this.

       
      com.sos.jitl.restclient.JobSchedulerRestClient.headers.put("Accept","application/json");
      com.sos.jitl.restclient.JobSchedulerRestClient.headers.put("Content-Type","application/json");
      var response = com.sos.jitl.restclient.JobSchedulerRestClient.executeRestServiceCommand( "post", url, body );
      

      The class JobSchedulerRestClient implements the method addHeader but this method is not static and therefore can not be used in a static way.

      Desired Behavior

      The method addHeader in the class JobSchedulerRestClient should be static.

       
      com.sos.jitl.restclient.JobSchedulerRestClient.addHeader("Accept","application/json");
      com.sos.jitl.restclient.JobSchedulerRestClient.addHeadder("Content-Type","application/json");
      var response = com.sos.jitl.restclient.JobSchedulerRestClient.executeRestServiceCommand( "post", url, body );
      

        Attachments

          Activity

            People

            • Assignee:
              ur Uwe Risse
              Reporter:
              ur Uwe Risse
              Approver:
              Kanika Agrawal
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: