John Decowski Member Licensed User Longtime User Jun 2, 2019 #1 https://www.b4x.com/android/forum/threads/jhttputils2-source-code.39415/ trying to use this code for an https connection. and it isnt working. ive tried to "hc.InitializeAcceptAll("hc")" as noted in other posts. still getting the following error. Waiting for debugger to connect... Program started. Jun 02, 2019 11:52:20 AM org.apache.http.client.protocol.ResponseProcessCookies processCookies WARNING: Invalid cookie header: "set-cookie: ctoken=62240cb2f8944284b08af420d9dc9ef1; Domain=.iextrading.com; Path=/; Expires=Mon, 03 Jun 2019 03:52:20 GMT; Secure". Unable to parse expires attribute: Mon, 03 Jun 2019 03:52:20 GMT Not Found JobName = Job2, Success = false Error: Not Found JobName = Job3, Success = true im trying to get the following page source back: https://api.iextrading.com/1.0/stock/market/batch?symbols=sbot&types=quote&range=1m&last=1 it works fine in my browser if im not using the correct library can someone please refer me to the correct library i should be using. All i want to do is get back the page source for that page so i can trim out what i need. thanks in advance
https://www.b4x.com/android/forum/threads/jhttputils2-source-code.39415/ trying to use this code for an https connection. and it isnt working. ive tried to "hc.InitializeAcceptAll("hc")" as noted in other posts. still getting the following error. Waiting for debugger to connect... Program started. Jun 02, 2019 11:52:20 AM org.apache.http.client.protocol.ResponseProcessCookies processCookies WARNING: Invalid cookie header: "set-cookie: ctoken=62240cb2f8944284b08af420d9dc9ef1; Domain=.iextrading.com; Path=/; Expires=Mon, 03 Jun 2019 03:52:20 GMT; Secure". Unable to parse expires attribute: Mon, 03 Jun 2019 03:52:20 GMT Not Found JobName = Job2, Success = false Error: Not Found JobName = Job3, Success = true im trying to get the following page source back: https://api.iextrading.com/1.0/stock/market/batch?symbols=sbot&types=quote&range=1m&last=1 it works fine in my browser if im not using the correct library can someone please refer me to the correct library i should be using. All i want to do is get back the page source for that page so i can trim out what i need. thanks in advance
Erel B4X founder Staff member Licensed User Longtime User Jun 3, 2019 #2 Works fine here. Tested with jOkHttpUtils2 library and this code: Code: Copy Dim j As HttpJob j.Initialize("", Me) j.Download("https://api.iextrading.com/1.0/stock/market/batch?symbols=sbot&types=quote&range=1m&last=1") Wait For (j) JobDone(j As HttpJob) If j.Success Then Log(j.GetString) End If j.Release Upvote 0
Works fine here. Tested with jOkHttpUtils2 library and this code: Code: Copy Dim j As HttpJob j.Initialize("", Me) j.Download("https://api.iextrading.com/1.0/stock/market/batch?symbols=sbot&types=quote&range=1m&last=1") Wait For (j) JobDone(j As HttpJob) If j.Success Then Log(j.GetString) End If j.Release