let provider = OnlineODataProvider(serviceName: "API_OUTBOUND_DELIVERY_SRV", serviceRoot: "https://my300942-api.s4hana.ondemand.com/sap/opu/odata/sap/API_OUTBOUND_DELIVERY_SRV/")
//APIOUTBOUNDDELIVERYSRVEntities is the part of proxy generated classes
let service = APIOUTBOUNDDELIVERYSRVEntities(provider: provider)
do
{
let data2 = try service.fetchAOutbDeliveryHeader()
print(data2)
}
catch
{
print(error.localizedDescription)
}
Below is the error getting :
Expected response with DataServiceVersion 2.0, header not found! This error can be disabled by setting serviceOptions.checkVersion = false. But first, the provider URL should be checked in case this client is accidentally communicating with the wrong service version.