Client statements

This commit is contained in:
Hillel Coren 2021-10-10 16:59:43 +03:00
parent c8199122d5
commit 223310daed
2 changed files with 3 additions and 3 deletions

View File

@ -247,6 +247,8 @@ const String kGatewayTypeCredit = '10';
const String kGatewayTypeKBC = '11';
const String kGatewayTypeBancontact = '12';
const String kGatewayTypeIDeal = '13';
const String kGatewayTypeGiropay = '14';
const String kGatewayTypePrzelewy24 = '15';
const kGatewayTypes = {
kGatewayTypeCreditCard: 'credit_card',

View File

@ -324,9 +324,7 @@ Future<Response> _loadPDF(
} else {
final invitation = invoice.invitations.first;
final url = invitation.downloadLink;
final client = http.Client();
response = await client.get(Uri.parse(url));
client.close();
response = await WebClient().get(url, '', rawResponse: true);
}
if (response.statusCode >= 400) {