aria2c 0.0.5 aria2c: ^0.0.5 copied to clipboard
Use dart and aria2c to connect websocket for JsonRPC communication.
Aria2c-dart #
Features #
- Connect to an aria2 jsonrpc server, control the aria2 downloader remotely.
- Support http, websocket.
- Support secret authentication
Getting started #
flutter pub add aria2c
Usage #
You can use this package like this:
import 'package:aria2c/aria2c.dart';
Aria2cWebSocketRPC rpc = Aria2cWebSocketRPC(Uri.parse('ws://127.0.0.1:6800/jsonrpc'), rpcSecret: '123456789');
await rpc.connect();
Aria2cResult result = await rpc.addUri('https://example.com/file.zip',{
'dir':'/path/to/save',
'out':'file.zip'
});
String gid = result.gid;
Aria2cStatusResult downloadStatus = await rpc.tellStatus(gid);
Additional information #
If you have any usage problem ,please tell me in the Issues.