B4J Question HTTP response Headers in Non Ui applications

Pedro Caldeira

Active Member
Licensed User
Longtime User
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

B4X:
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
 

Pedro Caldeira

Active Member
Licensed User
Longtime User
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
Top