The UltraCode has been totally rewritten, and a Tokenizer has been added.
The syntax has also been changed. Now, all the parameters in a method MUST be inside of double quotes.
A known issue is that you can't write more than one method PER LINE. And that the uc open and close tag ("<uc>" and "</uc>") can NOT be in the same line of the method, so no way to make the code
Code (HTML5):
<uc> echo("test");
</uc>
compact, or fit in just one line. For now
Some of the existing methods' structure has been modified. And some new has been implemented. Here following, the list of all the methods!
* plugin.execute(String action, boolean echo); - This actually triggers the method #execute(WebServerAction
webServerAction) inside of the class extending the WebServer. It passes the WebServerAction Object, which contains the #action, and the Socket connection, which is the connection between the client and the HTTP WebServer. Both of them can be get from a getter (#getAction() and #getConnection()).
* api.call(String url, String method, String parameters, boolean echo); - Makes a HTTP Request of the method #method (which can be either "GET" or "POST" to the #url with #parameters as parameters. The type of the #parameters is NOT JSON, instead, a GET-Like syntax is used, so for example: "id=1&user=test". Note there is no question mark? That's not a mistake. Don't add one. The echo is a boolean, which MUST be inside of the quotes anyway, and is whether it should echo the result of the request or not.
+ website.request(String url, boolean echo); - Loads the website #url. The boolean #echo is whether it should print the CONTENT of the webpage.
| getFileName(); - Echoes the name of the file that has been actually loaded.
| getRequestedFileName(); - Echoes the name of the requested file, the one in the navigation bar
+ newLine(); - Echoes a <br>
* getClientAddress(); - Echoes the address of the client
* getClientPort(); - Echoes the connection port of the client
+ getLocalAddress(); - Echoes the local address
+ getLocalPort(); - Echoes the local port, the one the webserver is running on.
+ echo(String string); - Echoes the String #string.
+ = added
- = removed
* = modified
| = same as the older version.