xapi

Creator: coderz1093

Last updated:

0 purchases

xapi Image
xapi Images
Add to Cart

Description:

xapi

xapi #
a dio wraper
Get started #
Add dependency #
xapi:
git:
url: https://[email protected]/soeil/xapi.git
copied to clipboard
Set file configuration #
Xapi.setConfig(BasicSetting('https://tribelio.app.ittron.co.id/', 5000, 3000));
copied to clipboard
Set callback for error response and on receive response #
xapi.onErrorResponse = (String message, String type, response) {
print(message);
};
xapi.onReceiveResponse = (dynamic response) {};
copied to clipboard
GET Request #
Xapi xapi = Xapi();

xapi.onErrorResponse = (String message, String type, response) {
print(message);
};
xapi.onReceiveResponse = (dynamic response) {};
xapi.get(
"api/member/commerceAdmin/GetProduct?lang=en_US&networkId=859&page=1&lat=-7.2681467&statusActive=all&devices=android&isMobile=1&sessionId=20210218180520602e49f092e41&networkAccountId=198&lng=112.7344126",
onReceiveProgress: (a, b) {
print('onReceiveProgress $a $b');
},
);
copied to clipboard
POST Request #
xapi.post(
'api/',
data: {
'file': xapi.fromFile(file.path, 'aaa.jpg'),
},
onSendProgress: (int a, int b) {
print('onSendProgress $a $b');
}
);
copied to clipboard
PUT Request #
xapi.put(
'api/',
data: {
'file': xapi.fromFile(file.path, 'aaa.jpg'),
},
onSendProgress: (int a, int b) {
print('onSendProgress $a $b');
}
);
copied to clipboard
DELETE Request #
Xapi xapi = Xapi();

xapi.onErrorResponse = (String message, String type, response) {
print(message);
};
xapi.onReceiveResponse = (dynamic response) {};
xapi.get(
"api/member/commerceAdmin/GetProduct?lang=en_US&networkId=859&page=1&lat=-7.2681467&statusActive=all&devices=android&isMobile=1&sessionId=20210218180520602e49f092e41&networkAccountId=198&lng=112.7344126",
onReceiveProgress: (a, b) {
print('onReceiveProgress $a $b');
},
);
copied to clipboard
Download Request #
xapi.download('https://www.google.com/', '${value.path}/x.html', onReceiveProgress: (int a, int b) {
print('onSendProgress $a $b');
});
copied to clipboard

License

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

Files In This Product:

Customer Reviews

There are no reviews.