Xojo Plugin Fatturazione Elettronica Aruba IT: Monitor Check

Back to Index

Restituisce il valore del metodo check monitor

Documentation: https://fatturazioneelettronica.aruba.it/apidoc/docs.html#_monitorcheck

CURL Command

curl -X POST  https://demows.fatturazioneelettronica.aruba.it/services/invoice/MonitorCheck \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer NLOGDVXLVaF3tzmnVPkTwpkuh7dG0i09uSCcog3u+rE='

Xojo Plugin Example

Dim rest As New Chilkat.Rest
Dim success As Boolean

//  URL: https://demows.fatturazioneelettronica.aruba.it/services/invoice/MonitorCheck
Dim bTls As Boolean
bTls = True
Dim port As Int32
port = 443
Dim bAutoReconnect As Boolean
bAutoReconnect = True
success = rest.Connect("demows.fatturazioneelettronica.aruba.it",port,bTls,bAutoReconnect)
If (success <> True) Then
    System.DebugLog("ConnectFailReason: " + Str(rest.ConnectFailReason))
    System.DebugLog(rest.LastErrorText)
    Return
End If

success = rest.AddHeader("Content-Type","application/json")
success = rest.AddHeader("Authorization","Bearer NLOGDVXLVaF3tzmnVPkTwpkuh7dG0i09uSCcog3u+rE=")
success = rest.AddHeader("Accept","application/json")

Dim sbResponseBody As New Chilkat.StringBuilder
success = rest.FullRequestNoBodySb("POST","/services/invoice/MonitorCheck",sbResponseBody)
If (success <> True) Then
    System.DebugLog(rest.LastErrorText)
    Return
End If

Dim respStatusCode As Int32
respStatusCode = rest.ResponseStatusCode
If (respStatusCode >= 400) Then
    System.DebugLog("Response Status Code = " + Str(respStatusCode))
    System.DebugLog("Response Header:")
    System.DebugLog(rest.ResponseHeader)
    System.DebugLog("Response Body:")
    System.DebugLog(sbResponseBody.GetAsString())
    Return
End If

Dim jsonResponse As New Chilkat.JsonObject
success = jsonResponse.LoadSb(sbResponseBody)

//  See the Online Tool for Generating JSON Parse Code
Dim errorCode As String
Dim errorDescription As String
Dim checkValue As String

errorCode = jsonResponse.StringOf("errorCode")
errorDescription = jsonResponse.StringOf("errorDescription")
checkValue = jsonResponse.StringOf("checkValue")

Sample JSON Response Body

{
  "errorCode": "",
  "errorDescription": "",
  "checkValue": "Service it.arubapec.fatturapa.uploadservice.UploadService STATUS UP"
}