User bio
404 bio not found
Member since Dec 4, 2015
Replies:

So if I am calling this service from an Ensemble operation that looks something like this:

Method getPatient(pRequest As RESTDemo.REST.ClaimRequest, Output pResponse As EnsLib.REST.GenericMessage) As %Status
{
  try {
    // Prepare and log the call
    // Append the claim to the URL
    Set tURL=..Adapter.URL_"/claims/"_pRequest.claimBlob    
       
    // Execute the call
    set tSC=..Adapter.GetURL(tURL,.tHttpResponse)
       
    #; Suppress HTTP status errors and just pass back the status, headers and body
    If $$$ISERR(tSC)&&'$$$StatusEquals(tSC,$$$EnsErrHTTPStatus) { Quit }
       
    // Return the response      
    Set tSC=$$$OK
    If $IsObject(tHttpResponse.Data) {
      Set tStream=tHttpResponse.Data
    } Else {
      Set tStream=##class(%GlobalBinaryStream).%New()
      Set tSC=tStream.Write(tHttpResponse.Data)  Quit:$$$ISERR(tSC)
    }
    Set pResponse=##class(EnsLib.REST.GenericMessage).%New(tStream,,tHttpResponse)
    Do pResponse.HTTPHeaders.SetAt(tHttpResponse.StatusLine,"StatusLine")
  } catch {
    Set tSC=$$$SystemError
  }
  Quit tSC
}

Would I just call $system.Encryption.Base64Encode() on the claimBlob property?

Certifications & Credly badges:
Jeffrey has no Certifications & Credly badges yet.
Global Masters badges:
Followers:
Jeffrey has no followers yet.
Following:
Jeffrey has not followed anybody yet.