Good morning,
I state that I have a thousand proofs and read everything I could read on the forum before posting.
I try to use a web service (working and tested with ios) which returns continually "Error: Not Acceptable: Unknown or unsupported response format."
Base code used is HttpUtils2 example:
Logfile:
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = true **
** Service (httputils2service) Destroy **
Installing file.
PackageAdded: package:anywheresoftware.b4a.samples.httputils2
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Service (httputils2service) Create **
** Service (httputils2service) Start **
JobName = Job2, Success = false
Error: Not Acceptable: Unknown or unsupported response format.
** Activity (main) Pause, UserClosed = true **
Anyone can help me?
Thanks
I state that I have a thousand proofs and read everything I could read on the forum before posting.
I try to use a web service (working and tested with ios) which returns continually "Error: Not Acceptable: Unknown or unsupported response format."
Base code used is HttpUtils2 example:
B4X:
'Activity module
Sub Process_Globals
End Sub
Sub Globals
End Sub
Sub Activity_Create(FirstTime As Boolean)
Dim job1, job2, job3 As HttpJob
'job1.Initialize("Job1", Me)
'Send a GET request
'job1.Download2("http://www.b4x.com/print.php", _
' Array As String("first key", "first value :)", "second key", "value 2"))
'Send a POST request
job2.Initialize("Job2", Me)
job2.PostString("http://www.xxxxxxxxx.com/restsrv/user/login", "username=user&password=pwd")
'Send a GET request
'job3.Initialize("Job3", Me)
'job3.Download("http://www.b4x.com/forum/images/categories/android.png")
End Sub
Sub JobDone (Job As HttpJob)
Log("JobName = " & Job.JobName & ", Success = " & Job.Success)
If Job.Success = True Then
Select Job.JobName
Case "Job1", "Job2"
'print the result to the logs
Log(Job.GetString)
Case "Job3"
'show the downloaded image
Activity.SetBackgroundImage(Job.GetBitmap)
End Select
Else
Log("Error: " & Job.ErrorMessage)
ToastMessageShow("Error: " & Job.ErrorMessage, True)
End If
Job.Release
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Logfile:
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = true **
** Service (httputils2service) Destroy **
Installing file.
PackageAdded: package:anywheresoftware.b4a.samples.httputils2
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Service (httputils2service) Create **
** Service (httputils2service) Start **
JobName = Job2, Success = false
Error: Not Acceptable: Unknown or unsupported response format.
** Activity (main) Pause, UserClosed = true **
Anyone can help me?
Thanks
Last edited: