- Smart Personal Cloud

Request Processing


Creating a dynamic web application requires processing information that is retrieved from the URL when a user makes a request. For example, a parameter on the URL (i.e., http://www.webpage.com/page.ws?var=1) can be used to change the rendering or behavior of a page within your application. The Star Script language does not have any special language syntax to support HTTP request processing. HTTP request processing is implemented as part of the MyEzApp web framework library.


On MyEzApp website, HTTP request and response are converted to the Request and Response object and set to the processing context. To get hold of the request object and response object, you will need to call native methods on the /web/http script. For example,

use /web/http     http.request() http.response()

HttpRequest object has the following methods:

func get(name as String) as String func getUpload(name as string) as byte[] func has(name as String) as Bool func getPath() as string func isSecure() as bool func getRemoteAddr() as string

If you want to get an URL parameter from HTTP Request object, you only need to call the func get() method as illustrated below:

var value = http.request.get("name")

The HTTP Response object has the following methods:

func redirect(redirectTo as String) as Void

Normally, a MyEzApp application does not need to access the HTTT Response object. The output of the running script is automatically set to the HTTP Response object. If you need to redirect the user to a different page, you may need to access the response object directly to set a specific destination.


If your application needs to retain state across different pages, you will need to use URL parameters, a hidden form field, or set that value in the database. For security reasons, MyEzApp.com does not allow the use of cookies within any applications.