Sample code for 30+ languages & platforms
B4X

Aruba Fatturazione Elettronica GetTransmissionInfoRequest

See more Aruba Fatturazione Examples

Query the status of a request.

Chilkat B4X Downloads

B4X
Dim success As Boolean = False

'  This example assumes the Chilkat API to have been previously unlocked.
'  See Global Unlock Sample for sample code.

Dim http As ChilkatHttp
http.Initialize("http")

'  Implements the following CURL command:

'  curl -X POST https://ws.fatturazioneelettronica.aruba.it/services/ClientRequest/GetTransmissionInfoRequest \
'    -H "Accept: application/json" \
'    -H "Content-Type: application/json;charset=UTF-8" \
'    -d '{
'    "userName" : "ARUBA0000",
'    "password" : "ArubaPwd",
'    "requestID" : "UYZCDNDYKQ"
'  }'

'  Use the following online tool to generate HTTP code from a CURL command
'  Convert a cURL Command to HTTP Source Code

'  Use this online tool to generate code from sample JSON:
'  Generate Code to Create JSON

'  The following JSON is sent in the request body.

'  {
'    "userName": "ARUBA0000",
'    "password": "ArubaPwd",
'    "requestID": "UYZCDNDYKQ"
'  }

Dim json As ChilkatJsonObject
json.Initialize
json.UpdateString("userName", "ARUBA0000")
json.UpdateString("password", "ArubaPwd")
json.UpdateString("requestID", "UYZCDNDYKQ")

http.SetRequestHeader("Content-Type", "application/json;charset=UTF-8")
http.SetRequestHeader("Accept", "application/json")

Dim resp As ChilkatHttpResponse
resp.Initialize
success = http.HttpJson("POST", "https://ws.fatturazioneelettronica.aruba.it/services/ClientRequest/GetTransmissionInfoRequest", json, "application/json", resp)
If success = False Then
    Log(http.LastErrorText)
    Return
End If


Dim sbResponseBody As ChilkatStringBuilder
sbResponseBody.Initialize
resp.GetBodySb(sbResponseBody)

Dim jResp As ChilkatJsonObject
jResp.Initialize
jResp.LoadSb(sbResponseBody)
jResp.EmitCompact = False

Log("Response Body:")
Log(jResp.Emit)

Dim respStatusCode As Int = resp.StatusCode
Log("Response Status Code = " & respStatusCode)
If respStatusCode >= 400 Then
    Log("Response Header:")
    Log(resp.Header)
    Log("Failed.")
Else
    Log("Success.")
End If