Hi I'm trying to send a request to a REST API Service. I'm using this code (Adapter is  "EnsLib.HTTP.OutboundAdapter")</p>

Method Put(pRequest As SIGE.Grupo.BO.Operation.putRequest, Output pResponse As SIGE.Grupo.BO.Operation.putResponse) As %Status
{
set tSC = $$$OK

try
{</p>

     set tFormVar="Content-Type,apikey"
     set tContent="application/json"
     set tApiKey="somekey"</p>


     Set tOut=##class(%IO.StringStream).%New()
     set tSC= ..ObjectToJSONStream(pRequest,.tOut)


     Set tSC=..Adapter.Put(.tHttpResponse,tFormVar,tContent,tApiKey,tOut.Data)
    
If $$$ISERR(tSC)&&$IsObject(tHttpResponse)&&$IsObject(tHttpResponse.Data)&&tHttpResponse.Data.Size {
Set tSC=$$$ERROR($$$EnsErrGeneral,$$$StatusDisplayString(tSC)_":"_tHttpResponse.Data.Read())
}
Quit:$$$ISERR(tSC)

}
catch
    {
    Set tSC=$$$SystemError
    }
    quit tSC
}
 </p>

but I got a missing message alert from the REST Service

Also, I tried with this  set tFormVar="Content-Type,apikey,cur" but I got a duplicate apikey message.

This is the right way to send a header and body to a PUT operation in REST API?

Thanks & Best Regards

Sergio

</body></html>