paynym.is api debugging info

This commit is contained in:
julian 2023-04-25 15:08:24 -06:00
parent fea0aeea64
commit 61bb4b839d

View file

@ -25,14 +25,18 @@ class PaynymIsApi {
version +
(endpoint.startsWith("/") ? endpoint : "/$endpoint");
final uri = Uri.parse(url);
final headers = {
'Content-Type': 'application/json; charset=UTF-8',
}..addAll(additionalHeaders);
final response = await http.post(
uri,
headers: {
'Content-Type': 'application/json; charset=UTF-8',
}..addAll(additionalHeaders),
headers: headers,
body: jsonEncode(body),
);
debugPrint("Paynym request uri: $uri");
debugPrint("Paynym request body: $body");
debugPrint("Paynym request headers: $headers");
debugPrint("Paynym response code: ${response.statusCode}");
debugPrint("Paynym response body: ${response.body}");