Code cleanup

This commit is contained in:
Hillel Coren 2021-10-24 15:20:39 +03:00
parent 16bc3f81b9
commit 9a417c41be
1 changed files with 10 additions and 7 deletions

View File

@ -80,18 +80,21 @@ class WebClient {
if (multipartFiles != null) {
response = await _uploadFiles(url, token, multipartFiles, data: data);
} else {
final client = http.Client();
response = await client
.post(
Uri.parse(url),
body: data,
headers: _getHeaders(
final headers = _getHeaders(
url,
token,
secret: secret,
password: password,
idToken: idToken,
),
);
//print('Headers: $headers');
final client = http.Client();
response = await client
.post(
Uri.parse(url),
body: data,
headers: headers,
)
.timeout(
Duration(