HTTP Utils

dctechonline

Member
Licensed User
Longtime User
In vb.net i would use the following code to get website data and format as tab delimited.

Public Sub getResults(ByVal websiteURL As String)
Dim c As New WebClient
c.Headers("Accept") = "text/tab-separated-values"
c.DownloadStringAsync(New Uri(websiteURL))
AddHandler c.DownloadStringCompleted, AddressOf c_DownloadStringCompleted
End Sub

Is there a similar way to get the data back using HTTP utils in this format? I followed the httputils example and right now it appears to be retrieving data in JSON format.

Thanks in advance.
 

dctechonline

Member
Licensed User
Longtime User
After posting this message i did switch to HttpUtils2.

I modified the following in the Httpjob

Public Sub Download(Link As String)
mLink = Link

req.SetHeader("Accept", "text/tab-separated-values")
req.InitializeGet(Link)

CallSubDelayed2(HttpUtils2Service, "SubmitJob", Me)
End Sub

Now im getting "An error has occured in sub: httpjob_download (java line:74) java.lang.NullPointerException Continue?"

Did i put it in the wrong spot?

Thanks.
 
Upvote 0

dctechonline

Member
Licensed User
Longtime User
I just noticed that it is not returning the entire block of data. Is there some limit to the amount of data returned?
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…