Biografía del usuario
I've been Software Engineer and Java Developer for 20 years with 15 years working for the HealthCare sector.
Madrid
Miembro desde 13 jun, 2022
Publicaciones:
Respuestas:
@Jaume Marcet ¿Has podido probar el código?
Hola @Jaume Marcet!
Echa un vistazo a este código de ejemplo que me ha sugerido nuestro amigo el chatbot de IA:
Class objectscript.postXML
{
ClassMethod test() {
Set HTTPRequest = ##class(%Net.HttpRequest).%New()
Set HTTPRequest.ContentType = "text/xml"
Set HTTPRequest.NoDefaultContentCharset = 1
Set HTTPRequest.Server = "wph.foactive.com" // Specify server address here
Set HTTPRequest.Location = "/ITOMCZ" // Specify location or endpoint here
// Modify headers if necessary
Do HTTPRequest.RemoveHeader("User-Agent")
Do HTTPRequest.RemoveHeader("Accept-Encoding")
Do HTTPRequest.RemoveHeader("Connection")
Do HTTPRequest.SetHeader("Expect", "100-continue")
// Open XML file and copy its content into the request body
Set RequestXML = ##class(%Library.File).%New("c:\\path\\to\\your\\file.xml") // Specify file path here
Do RequestXML.Open("RS")
Do HTTPRequest.EntityBody.CopyFrom(RequestXML)
Do RequestXML.%Close()
// Send the request
Set sc = HTTPRequest.Post(HTTPRequest.Location)
// Check the response
If $$$ISOK(sc) {
Write HTTPRequest.HttpResponse.StatusCode, !
Write HTTPRequest.HttpResponse.Data.Read(), !
} Else {
// Handle errors
Write "Error in request: ", $System.OBJ.DisplayError(sc), !
}
}
}
Aplicaciones de Open Exchange:
Insignias y certificaciones Credly:





Insignias de Global Masters:







Seguidores:
Siguiendo:
Luis Angel aún no sigue a nadie.
Buenas, eso tiene pinta de que hay una redirección a la URL a la que estás invocando.