Android Question Converting winHttpRequest to B4A.

potman100

Active Member
Licensed User
Longtime User
Hi

I have some code I use in VB6 and would like to get it working under B4A, there are are a couple of Headers options that are available in a winHTTPRequest that I can't seem to get working on B4A :

B4X:
Function SetHeaders(ByRef w As WinHttpRequest)

Dim EnableRedirects_Value As String
    
    w.SetClientCertificate mvarCertificate ' Contain the text of the certificate
    EnableRedirects_Value = w.Option(WinHttpRequestOption_EnableRedirects)
    w.SetRequestHeader "Accept", "application/json"
    w.SetRequestHeader "Content-Type", "application/json"
    w.SetRequestHeader "Platform", "android"
    w.SetRequestHeader "AppVersion", Version
    w.SetRequestHeader "OSVersion", "4.4.1"
    w.SetRequestHeader "Model", "Samsung"

End Function

I can't find away to replicate

SetClientCertificate


and

w.Option(WinHttpRequestOption_EnableRedirects)

Any help would be gratefully received.

Regards

Potman
 

potman100

Active Member
Licensed User
Longtime User
Hi Erel

Sorry to bother you again, but I think I understand how to create the keystore, but I'm struggling to find
how to use it with Okhttp, you don't have an example of it do you ?

Thanks for your help.
 
Upvote 0
Top