I am using the following boilerplate code for OkHttpUtils2 with Wait For:
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
The only thing out of the ordinary is this Sub is run from a separate class.
I was getting an error with my website, so I tried a couple of others. I keep getting the following error in the logs:
*** Service (httputils2service) Create ***
** Service (httputils2service) Start **
ResponseError. Reason: java.net.UnknownHostException: Unable to resolve host "www.wikipedia.org": No address associated with hostname, Response:
Object context is paused. Ignoring CallSubDelayed: JobDone
On other occasions I just get:
*** Service (httputils2service) Create ***
** Service (httputils2service) Start **
Object context is paused. Ignoring CallSubDelayed: JobDone
Everything should be working. Any suggestions?
			
			
			
				B4X:
			
		
		
		Public Sub FetchData
   Dim myJob As HttpJob
 
   myJob.Initialize("", Me)
   myJob.Download("https://www.wikipedia.org/")
   Wait For (myJob) JobDone (myJob As HttpJob)
   If myJob.Success Then
       Log(myJob.GetString)
   Else
       Log("Error: " & myJob.ErrorMessage)
   End If
   myJob.Release
     
End SubThe only thing out of the ordinary is this Sub is run from a separate class.
I was getting an error with my website, so I tried a couple of others. I keep getting the following error in the logs:
*** Service (httputils2service) Create ***
** Service (httputils2service) Start **
ResponseError. Reason: java.net.UnknownHostException: Unable to resolve host "www.wikipedia.org": No address associated with hostname, Response:
Object context is paused. Ignoring CallSubDelayed: JobDone
On other occasions I just get:
*** Service (httputils2service) Create ***
** Service (httputils2service) Start **
Object context is paused. Ignoring CallSubDelayed: JobDone
Everything should be working. Any suggestions?
			
				Last edited: 
			
		
	
								
								
									
	
								
							
							 
				 
 
		 
 
		 
 
		 
 
		