The [web_response->setStatus] method takes a status code (integer) and a message string and sets that as the HTTP status for the response you are generating.
web_response->setStatus(code, message)
The code below shows how you would set the HTTP response status to "401 Unauthorized" if someone tried to access a page that required authentication, but they were not logged in.
Code
web_response->setStatus(401, 'Unauthorized')
Result
//HTTP response header set to "401 Unauthorized"
Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft
Recent Comments