I need you to help me out of the Swamp:
I want to catch in an array (tsXmlerror), the error message the sXML string
Code:
Struct sXmlerror
String timestamp
String status
String Error
String message
String path
End_Struct
sXmlerror[] tsXmlerror
Set RequestHeader of hoXML to "Authorization" sToken
Get UploadJSONString of hoXML shost sCadena to sXML
sXML=
{
"timestamp": 1566050355347,
"status": 401,
"error": "Unauthorized",
"message": "Unauthorized",
"path": "/FacturaAsync"
}
If (Pos("error",sXML)) Begin
// pasar el json a un arreglo
Get Create (RefClass(cJsonObject)) to hoJxml
Get ParseString of hoJxml sXML to bOk
If (bOk) Get JsonToDataType of hoJxml to tsXmlerror
Send Destroy of hoJxml
Send Info_Box sXML "FALLIDO"
Function_Return False
End
When loading the structure, I get the error shown below.
Thanks for your suggestions.
Edgar