mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 17:57:40 +00:00
WIP showing that added Content-Lengths get stripped/ignored
This commit is contained in:
parent
20e5f74ab2
commit
ba42b76296
1 changed files with 5 additions and 0 deletions
|
@ -39,8 +39,13 @@ class PaynymIsApi {
|
|||
version +
|
||||
(endpoint.startsWith("/") ? endpoint : "/$endpoint");
|
||||
final uri = Uri.parse(url);
|
||||
|
||||
// Calculate the body length.
|
||||
int contentLength = utf8.encode(jsonEncode(body)).length;
|
||||
|
||||
final headers = {
|
||||
'Content-Type': 'application/json; charset=UTF-8',
|
||||
'Content-Length': contentLength.toString(), // Set the Content-Length header.
|
||||
}..addAll(additionalHeaders);
|
||||
final response = await client.post(
|
||||
url: uri,
|
||||
|
|
Loading…
Reference in a new issue