Initialize Question

MrDavis

New Member
Licensed User
Longtime User
Simple question - I have looked at dox and just do not understand where "http" comes from in the piece of code below. I do not see it defined or used elsewhere in the program but, I do know it will not run properly if it is changed. I know this is simple...but it is bugging the hell out of me!

HttpClient1.Initialize("http")
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Very good question.
It can be any string you want. This is the EventName parameter. Basic4android Search: httpclient.initialize
It sets the subs that will handle the events:
B4X:
HttpClient1.Initialize("abcd")
...
Sub abcd_ResponseError (Response As HttpResponse, Reason As String, StatusCode As Int, TaskId As Int)
    
End Sub
Sub abcd_ResponseSuccess (Response As HttpResponse, TaskId As Int)
    
End Sub
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…