-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
script: request galleries with default headers
- Loading branch information
1 parent
977ae36
commit 90826a0
Showing
2 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// This source code is a part of Project Violet. | ||
// Copyright (C) 2020-2022. violet-team. Licensed under the Apache-2.0 License. | ||
|
||
import 'package:http/http.dart' as http; | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_test/flutter_test.dart'; | ||
import 'package:violet/network/wrapper.dart'; | ||
|
||
void main() { | ||
setUp(() async { | ||
WidgetsFlutterBinding.ensureInitialized(); | ||
}); | ||
|
||
test("Test Bookmark", () async { | ||
var res = await http | ||
.get(Uri.parse('https://ltn.hitomi.la/galleries/2102839.js'), headers: { | ||
'accept': HttpWrapper.accept, | ||
'user-agent': HttpWrapper.mobileUserAgent, | ||
}); | ||
|
||
print(res.body); | ||
}); | ||
} |