Hello!
I'm writing an application that allows users to cycle between multiple accounts on an external service. This requires me to store/manage the cookies I use for each account, so I can present them to the server when I require information on a particular account.
On B4A and B4J, I modified the HTTPUtils2Service to grab the cookies after I send my request:
How will I handle this in B4i? The B4i ResponseSuccess method:
I noticed this is HttpResponse instead of OkHttpResponse. Will it be possible to get the headers from this?
Thank you!
I'm writing an application that allows users to cycle between multiple accounts on an external service. This requires me to store/manage the cookies I use for each account, so I can present them to the server when I require information on a particular account.
On B4A and B4J, I modified the HTTPUtils2Service to grab the cookies after I send my request:
B4X:
#if B4A or B4J
Sub hc_ResponseSuccess (Response As OkHttpResponse, TaskId As Int)
Dim job As HttpJob = TaskIdToJob.Get(TaskId)
job.Response = Response
job.Tag = Response.GetHeaders
Response.GetAsynchronously("response", File.OpenOutput(TempFolder, TaskId, False), _
True, TaskId)
End Sub
How will I handle this in B4i? The B4i ResponseSuccess method:
B4X:
Sub hc_ResponseSuccess (Response As HttpResponse, TaskId As Int)
CompleteJob(TaskId, True, "", Response)
End Sub
I noticed this is HttpResponse instead of OkHttpResponse. Will it be possible to get the headers from this?
Thank you!