Pedro Caldeira Active Member Licensed User Longtime User Mar 21, 2018 #1 How can I get the headers from the response in a non-ui application ? I recall that Erel provided a code to replace in the Httputils source to expose the headers, but how can i do it in non UI app ? code provided by Erel Code: Copy Sub hc_ResponseSuccess (Response As HttpResponse, TaskId As Int) Dim job As HttpJob = TaskIdToJob.Get(TaskId) job.Tag = Response.GetHeaders Response.GetAsynchronously("response", File.OpenOutput(TempFolder, TaskId, False), _ True, TaskId) End Sub
How can I get the headers from the response in a non-ui application ? I recall that Erel provided a code to replace in the Httputils source to expose the headers, but how can i do it in non UI app ? code provided by Erel Code: Copy Sub hc_ResponseSuccess (Response As HttpResponse, TaskId As Int) Dim job As HttpJob = TaskIdToJob.Get(TaskId) job.Tag = Response.GetHeaders Response.GetAsynchronously("response", File.OpenOutput(TempFolder, TaskId, False), _ True, TaskId) End Sub
Erel B4X founder Staff member Licensed User Longtime User Mar 22, 2018 #2 Pedro Caldeira said: How can I get the headers from the response in a non-ui application ? Click to expand... Exactly like you do in a UI application. Switch to OkHttpUtils2 source code instead of the library and make this modification. Upvote 0
Pedro Caldeira said: How can I get the headers from the response in a non-ui application ? Click to expand... Exactly like you do in a UI application. Switch to OkHttpUtils2 source code instead of the library and make this modification.
Pedro Caldeira Active Member Licensed User Longtime User Mar 22, 2018 #3 Erel said: Exactly like you do in a UI application. Switch to OkHttpUtils2 source code instead of the library and make this modification. Click to expand... OkHttpUtils2_NONUI source code, you mean ? Upvote 0
Erel said: Exactly like you do in a UI application. Switch to OkHttpUtils2 source code instead of the library and make this modification. Click to expand... OkHttpUtils2_NONUI source code, you mean ?
Erel B4X founder Staff member Licensed User Longtime User Mar 22, 2018 #4 This is the same source code. Upvote 0
Pedro Caldeira Active Member Licensed User Longtime User Mar 22, 2018 #5 Please help me with this, just add the two modules to my code and remove te reference to the compiled library ? i did that and I get some missing references errors. Can't i just compile the Okhttpuitls2 source code into a new library ? is it to hard to do that ? Upvote 0
Please help me with this, just add the two modules to my code and remove te reference to the compiled library ? i did that and I get some missing references errors. Can't i just compile the Okhttpuitls2 source code into a new library ? is it to hard to do that ?
Erel B4X founder Staff member Licensed User Longtime User Mar 22, 2018 #6 Pedro Caldeira said: Please help me with this, just add the two modules to my code and remove te reference to the compiled library ? Click to expand... Yes. OkHttpUtils2 depends on jOkHttp and jStringUtils. Pedro Caldeira said: is it to hard to do that ? Click to expand... No. It is very simple. Upvote 0
Pedro Caldeira said: Please help me with this, just add the two modules to my code and remove te reference to the compiled library ? Click to expand... Yes. OkHttpUtils2 depends on jOkHttp and jStringUtils. Pedro Caldeira said: is it to hard to do that ? Click to expand... No. It is very simple.
Pedro Caldeira Active Member Licensed User Longtime User Mar 22, 2018 #7 Erel said: No. It is very simple. Click to expand... I have to do something else other than compile the source code just like any other B4j application ? Or do I have to change something inthe xml also ? Upvote 0
Erel said: No. It is very simple. Click to expand... I have to do something else other than compile the source code just like any other B4j application ? Or do I have to change something inthe xml also ?
Erel B4X founder Staff member Licensed User Longtime User Mar 22, 2018 #8 Library compilation is explained here: https://www.b4x.com/android/forum/t...pile-your-project-to-a-library.24750/#content For further discussion please start a new thread. Upvote 0
Library compilation is explained here: https://www.b4x.com/android/forum/t...pile-your-project-to-a-library.24750/#content For further discussion please start a new thread.
B basic4mace Member Licensed User Longtime User Sep 8, 2018 #9 For those who stumble on this later version 2.70 does this without needing to modify the code: https://www.b4x.com/android/forum/t...putils2-httputils2-source-code.82632/#content. Upvote 0
For those who stumble on this later version 2.70 does this without needing to modify the code: https://www.b4x.com/android/forum/t...putils2-httputils2-source-code.82632/#content.