Quantcast
Channel: LiveCode Forums
Viewing all articles
Browse latest Browse all 821

Internet • Getting the contents of a web request using load url

$
0
0
Hi,

Im looking to use load url instead of get to save long pauses in my app.

I have the code

CODE:

on validateAPI  put "https://www.sample.com/v1/accounts/" into tURL  load url tUrl with message "validationLoaded"end validateAPIon validationLoaded pURL, pURLStatus   if pURLStatus is "cached" then      ## LiveCode has cached URL content. Accessing the url uses      ## the cache.       answer  "Result" && pURL            ## Remove URL from cache if you are all done with it.      unload url pURL   else      put libURLErrorData(pURL) into tError     answer "Error" && tError   end if   end validationLoaded
what do I have to add to get the page data? I can see the URL that has been called and its status (cached or error) fine, but I don't know what to do to get the actual page data and cant find any examples anywhere.

Thanks

Statistics: Posted by andyh1234 — Sun Oct 27, 2024 1:34 pm



Viewing all articles
Browse latest Browse all 821

Trending Articles