Hi,
I have updatec the OkHttpUtils2 library where as the httpjob now has an additional class global Map called ResponseHeaders. The ResponseHeaders are filled by the hc_ResponseSuccess sub.
When using the class modules directly in my project all works fine, however when compiling to a library it seems that the code stops somewhere.
So I've added some additional logging to the subs to see if they are being triggered.
I'm using httpjob.Download.
When running the project as a non-compiled library the result is as following:
However when running the same MAIN however having the modules added as a compiled library it, it stops after Download End. It seems that the Callsubdelayed is not being processed but I have no idea why this is.
The compiled library is added to my customs library function.
I've updated the library name and version numbers so I can keep track of it.
Allthough I have a work-around, i'm keen to understand why the compiled to library version of the code is not working.
I have updatec the OkHttpUtils2 library where as the httpjob now has an additional class global Map called ResponseHeaders. The ResponseHeaders are filled by the hc_ResponseSuccess sub.
When using the class modules directly in my project all works fine, however when compiling to a library it seems that the code stops somewhere.
So I've added some additional logging to the subs to see if they are being triggered.
I'm using httpjob.Download.
When running the project as a non-compiled library the result is as following:
B4X:
Waiting for debugger to connect...
Program started.
httpjob: Initializing
Utils2Service: Initializing
Utils2Service: working
Utils2Service: working
Utils2Service: working
Utils2Service: working
Utils2Service: Initialized
httpjob: Initialize complete
httpjob: Download
httpjob: Download end
Utils2Service: SubmitJob
Utils2Service: SubmitJob (MyMap) {1=[jobname=openurl, success=false, username=
, password=, errormessage=, responseheaders=(MyMap) {}
, target=class b4j.example.main, taskid=, req=anywheresoftware.b4h.okhttp.OkHttpClientWrapper$OkHttpRequest@2d363fb3
, tag=java.lang.Object@7d6f77cc, fx=anywheresoftware.b4j.objects.JFX@5aaa6d82, main=null
, httputils2service=null]}
Utils2Service: SubmitJob executetrue
Utils2Service: SubmitJob end
Utils2Service: hc_ResponseSuccess
Utils2Service: hc_ResponseSuccess end
Utils2Service: Response_StreamFinish
Utils2Service: CompleteJob
Utils2Service: CompleteJob end
Utils2Service: Response_StreamFinish end
[jobname=openurl, success=true, username=
, password=, errormessage=, responseheaders=(MyMap) {cache-control=[private], content-type=[text/html; charset=utf-8], date=[Sat, 17 Jun 2017 13:23:10 GMT], server=[Microsoft-IIS/8.5], vary=[Accept-Encoding], x-aspnet-version=[4.0.30319], x-powered-by=[ASP.NET]}
, target=class b4j.example.main, taskid=1, req=anywheresoftware.b4h.okhttp.OkHttpClientWrapper$OkHttpRequest@2d363fb3
, tag=java.lang.Object@7d6f77cc, fx=anywheresoftware.b4j.objects.JFX@5aaa6d82, main=null
, httputils2service=null]
However when running the same MAIN however having the modules added as a compiled library it, it stops after Download End. It seems that the Callsubdelayed is not being processed but I have no idea why this is.
The compiled library is added to my customs library function.
I've updated the library name and version numbers so I can keep track of it.
Allthough I have a work-around, i'm keen to understand why the compiled to library version of the code is not working.
B4X:
Waiting for debugger to connect...
Program started.
Open Page
httpjob: Initializing
Utils2Service: Initializing
Utils2Service: working
Utils2Service: working
Utils2Service: working
Utils2Service: working
Utils2Service: Initialized
httpjob: Initialize complete
httpjob: Download
httpjob: Download end