PowerShell
PowerShell
Aruba Fatturazione Elettronica GetTransmissionInfoRequest
See more Aruba Fatturazione Examples
Query the status of a request.Chilkat PowerShell Downloads
Add-Type -Path "C:\chilkat\ChilkatDotNet47-x64\ChilkatDotNet47.dll"
$success = $false
# This example assumes the Chilkat API to have been previously unlocked.
# See Global Unlock Sample for sample code.
$http = New-Object Chilkat.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"
# }
$json = New-Object Chilkat.JsonObject
$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")
$resp = New-Object Chilkat.HttpResponse
$success = $http.HttpJson("POST","https://ws.fatturazioneelettronica.aruba.it/services/ClientRequest/GetTransmissionInfoRequest",$json,"application/json",$resp)
if ($success -eq $false) {
$($http.LastErrorText)
exit
}
$sbResponseBody = New-Object Chilkat.StringBuilder
$resp.GetBodySb($sbResponseBody)
$jResp = New-Object Chilkat.JsonObject
$jResp.LoadSb($sbResponseBody)
$jResp.EmitCompact = $false
$("Response Body:")
$($jResp.Emit())
$respStatusCode = $resp.StatusCode
$("Response Status Code = " + $respStatusCode)
if ($respStatusCode -ge 400) {
$("Response Header:")
$($resp.Header)
$("Failed.")
}
else {
$("Success.")
}