HTTP request in BASIC
François Vanzeveren (2221) 241 posts |
Dear all Is it possible to do an http request in BASIC. The idea is to build a client interface in BASIC for RiscOS to access web services. Thank you for your help. regards |
John Sandgrounder (1650) 574 posts |
Yes. But, using the Socket SWIs in Basic is somewhat fiddly and time consuming but they are documented with the !StrongHelp application) There are a couple of options to simplify the task:- a) On a 26 bit computer, the simplest is to use the EasySockets module from Justin Fletcher. A web page can be fetched in half a dozen lines of code. The module comes with example code. However, EasySockets will not work on a 32 bit computer – like the Raspberry Pi without using using Aemulor. Although that combination works well b) Use the Wget module. (This is a RISCOS port of the popular Linux code). |
Matthew Phillips (473) 721 posts |
You can also use the URL_Fetcher module and AcornHTTP module. One issue with this is that it is limited to HTTP and does not support HTTPS (unless there is an HTTP fetcher module somewhere which I am not aware of). It is quite a nice system. See documentation |