Question
Rochdi Badis · May 22

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
  Token="sometoken_value"
   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

 

Thanks

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

Rochdi,

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