Rochdi Badis · May 22, 2022

Using a Service to get data (Inbound or outbound adapters)

Hi Guys.


I'm a newbie in productions and services and I'm using this code to get HTTP response with JSON file, is a way to do this via a production service?


set Httprequest ##class(%Net.HttpRequest).%New()
  Set Httprequest.SSLConfiguration="RTLS"                              
  Set Httprequest.Server="serverurl"                 
  Set Httprequest.Https=1
  Set Httprequest.Timeout=30
   set Httprequest.ContentType="application/json"
Do Httprequest.SetHeader("Accept","application/json")
Do Httprequest.SetHeader("Authorization","Bearer "_Token)
   set tSc = Httprequest.Post("/api/jobs")
  //S Resp=Httprequest.HttpResponse.Data.ReadLine()
   Set Resp=Httprequest.HttpResponse.Data.Read()
   Quit Resp



Product version: Ensemble 2014.1
0 159
Discussion (2)1
Log in or sign up to continue


Can you please expand on your needs.  Does what you are showing above work for you or are you getting errors?