Hi,
I’m using HTTPUtils with POST to communicate with webservices. This works fine as long as I POST 1 at a time, wait for the response and the post the next one.
Is there a way to use POST with multiple requests at the 'same' time?
Here is an example of what I try to do now, but only the first request is dealt with.
Greetings,
Sigurd
I’m using HTTPUtils with POST to communicate with webservices. This works fine as long as I POST 1 at a time, wait for the response and the post the next one.
Is there a way to use POST with multiple requests at the 'same' time?
Here is an example of what I try to do now, but only the first request is dealt with.
B4X:
'--- Countries
btnCachCountry.SetBackgroundImage(Design.bmpRefresh)
Dim objMap As Map: objMap.Initialize: Shared.AddLoginLanguage(objMap)
Dim objJSon As JSONGenerator: objJSon.Initialize(objMap)
HttpUtils.PostString("CountryList", Shared.CountryListURL, objJSon.ToString, Shared.ContentType)
'--- VehicleBrands
btnCachVehicleBrand.SetBackgroundImage(Design.bmpRefresh)
Dim objMap As Map: objMap.Initialize: Shared.AddLogin(objMap)
Dim objJSon As JSONGenerator: objJSon.Initialize(objMap)
HttpUtils.PostString("VehicleBrandList", Shared.VehicleBrandListURL, objJSon.ToString, Shared.ContentType)
'--- VehicleBrandModels
btnCachVehicleBrandModel.SetBackgroundImage(Design.bmpRefresh)
Dim objMap As Map: objMap.Initialize: Shared.AddLogin(objMap)
Dim objJSon As JSONGenerator: objJSon.Initialize(objMap): objMap.Put("CRBR_ID", Shared.EmptyGuid)
HttpUtils.PostString("VehicleBrandModelList", Shared.VehicleBrandModelListURL, objJSon.ToString, Shared.ContentType)
'--- VehicleColors
btnCachVehicleColor.SetBackgroundImage(Design.bmpRefresh)
Dim objMap As Map: objMap.Initialize: Shared.AddLoginLanguage(objMap)
Dim objJSon As JSONGenerator: objJSon.Initialize(objMap)
HttpUtils.PostString("VehicleColorList", Shared.VehicleColorListURL, objJSon.ToString, Shared.ContentType)
'--- VehicleTypes
btnCachVehicleType.SetBackgroundImage(Design.bmpRefresh)
Dim objMap As Map: objMap.Initialize: Shared.AddLoginLanguage(objMap)
Dim objJSon As JSONGenerator: objJSon.Initialize(objMap)
HttpUtils.PostString("VehicleTypeList", Shared.VehicleTypeListURL, objJSon.ToString, Shared.ContentType)
Greetings,
Sigurd