Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jaytaph/saffire-framework
https://github.com/jaytaph/saffire-framework
Last synced: 22 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/jaytaph/saffire-framework
- Owner: jaytaph
- Created: 2015-02-25T20:00:31.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-02-25T20:03:03.000Z (almost 10 years ago)
- Last Synced: 2024-10-15T22:11:07.335Z (2 months ago)
- Size: 133 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Simple module test for saffire.
More info: http://saffire-lang.org
(make sure the Noxlogic directory is located in the ./modules directory)
Contents of: ./test.sf:
```
// imports the io class from the io module as "io" into the current namespace
import io;
// Import framework and http request
import Noxlogic::Framework;
import Noxlogic::Framework::Http::Request;// Call the print method from our (imported) io class with a single argument
io.print("Hello world!\n");// Create request object
request = Request();
request.setHttpMethod("get");
request.setUrl("http://saffire-lang.org");// Request is automatically cast to string by the "print" method. (calls request.__string())
io.print(request, "\n");// Run the framework
app = Framework();
response = app.run(request);// Response is automatically cased: response.__string()
io.print("Response: ", response);
```