Transferring data from WS scripts to external URLs.
The wsCurl library is used with the load command to transfer data from a WS script to an external URL, such as Google Translate. This is particularly useful for foreign-language users who wish to input text in a non-Western language and then use a service such as Google Translate to change the text into English or some other language.
To add the wsCurl functionality to an existing WS Desktop implementation, please do the following:
To add the wsCurl functionality to an existing GuiXT Server implementation, please do the following:
To add the wsCurl functionality to an existing Offline implementation, please do the following:
The wsCurl feature is built using the cURL project. The syntax for this is as follows:
load('wscurl');
var ch = new wscurl(query_string);
ch->setopt(CURLOPT_HEADER, false);
var response = ch->exec()
ch->close();
ch = nil;
Please see the examples in Accessing Google Translate with wsCurl and Sending Webmail with wsCurl for examples on using wsCurl in WS scripts.