B4J Question okhttputils2 error

alas

Member
hi All

i have used okhttputils2 as per attached photo



but i got this error , i searched all the forum and tried all what written earlier but still i am getting the same error
 

alas

Member
There is no such field AcceptAllSSL.... I guess that you have mistakenly used a modified version of OkHttpUtils2.

Accept all: https://www.b4x.com/android/forum/t...putils2-and-accept-all-option.110673/#content
i used internal OkHttpUtils2 and i made changes in build configurations to hu2_public

download file:
Sub startdownload(filename1 As String)
    
    Private j As HttpJob
    '--------------------------------------------------------------- start the process of download
    getfilename' get the file name before saving
    '--------------------------------------------------------'load progress dialog
    ShowDialog
            
    '---------------------------------------------------------
    j.Initialize("", Me)
    'HttpUtils2Service.acceptallsslcertificate
    j.Download(filename1)
    Wait For (FindTaskId(j)) Complete (TaskId As Int)
    'Wait For (j) JobDone(j As HttpJob)
    Dim b() As Boolean = Array As Boolean(False)
    TrackProgress(j, b, TaskId)
'    j.Release
    Wait For (j) JobDone (j As HttpJob)
    b(0) = True
    
    If j.Success Then
        Label1.Text = Label1.Text
        ProgressBar1.Progress = 1
        If ProgressBar1.Progress=1 Then
            dialog.Close(xui.DialogResponse_Cancel)
        End If
        Dim out As OutputStream = File.OpenOutput(File.DirApp, filename , False)
        File.Copy2(j.GetInputStream, out)
        out.Close
        Log("success")
        fx.ShowExternalDocument(File.GetUri(File.Dirapp, ""))'open download folder
    
    End If
    
    j.Release
    'Return j.Success
    ''''''''''''''''''''''''''''''''''''''''' end of download file
    
End Sub

but still the file not download and i am getting this error

 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…