zeus

Creator: coderz1093

Last updated:

0 purchases

TODO
Add to Cart

Description:

zeus

zeus Library #
Install #
flutter pub add zeus
copied to clipboard
dart pub add zeus
copied to clipboard
Documentation #

Api
Database
Event-Emitter
Fetch
Server
Utils

Api #
Fetch #
quickstart:
import 'dart:convert';
import 'package:zeus/zeus.dart';
void main() async {
FetchResponse res = await fetch("https://api.example.com", {
"method": "post",
"headers": {"Content-Type": "application/json"},
"body": json.encode({"key": "value"})
});
print(res.body());
}
copied to clipboard
constructor
return Fetch Response



No
key
value
Deskripsi
required




1
url
String path url

yes


2
options
object
parameters di butuhkan jika method membutuhkannya
no




examples

fetch("https://api.example.com", {
"method": "post",
"headers": {
"Content-Type": "application/json"
},
"body": json.encode({
"key": "value"
})
});
copied to clipboard
FetchResponse #
statusCode
return status int from api



No
key
value
Deskripsi
required



FetchResponse res = await fetch("url");
print(res.statusCode);
copied to clipboard
body
return Object or text from api



No
key
value
Deskripsi
required



FetchResponse res = await fetch("url");
print(res.body());
copied to clipboard
Server #
quickstart:
import 'dart:convert';
import 'dart:io';
import 'package:zeus/zeus.dart';
void main() async {
Server app = Server();
app.on("/", (RequestApi req, ResponseApi res) async {
return res.send("api normal");
});
app.get("/json", (RequestApi req, ResponseApi res) async {
return res.send({"value": "json"});
});
app.listen(callback: (HttpServer server) {}, port: 8080, host: "0.0.0.0");
}
copied to clipboard
constructor



No
key
value
Deskripsi
required




examples

Server();
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files:

Customer Reviews

There are no reviews.