I tried to use OkHttpUtils2 with json,
the file adress have a key/password to get to the data.
I used j.password =
but The Log result is:
"ResponseError. Reason: Unauthorized, Response: {"message":"Need to provide a secret-key to READ private bins","success":false}"
B4X:
Sub Activity_Create(FirstTime As Boolean)
Dim j As HttpJob
j.Initialize("",Me)
j.Password = "********************"
j.Download("*********************")
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
Log(j.GetString)
End If
j.Release
End Sub
But still get the same result.. (
"ResponseError. Reason: Unauthorized, Response: {"message":"Need to provide a secret-key to READ private bins","success":false}" )
B4X:
Dim j As HttpJob
j.Initialize("",Me)
j.Password = "****************"
j.Download2("****************",Array As String("password", j.Password))
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
Log(j.GetString)
End If
j.Release
Dim j As HttpJob
j.Initialize("",Me)
j.Download("xx") '
j.GetRequest.SetHeader("secret-key", "xx")
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
Log(j.GetString)
End If
j.Release
Dim j As HttpJob
j.Initialize("",Me)
j.Download("xx") '
j.GetRequest.SetHeader("secret-key", "xx")
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
Log(j.GetString)
End If
j.Release