From 65ee26522c8886bbd8604079e3d624472fc7437b Mon Sep 17 00:00:00 2001 From: rra Date: Wed, 17 Jun 2020 18:21:36 +0200 Subject: [PATCH] small changes to debug output, calling it a day --- basic_ap.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/basic_ap.py b/basic_ap.py index b222e62..97f28a8 100644 --- a/basic_ap.py +++ b/basic_ap.py @@ -117,7 +117,7 @@ def sign_header(private_key, keyID, host, messageBodyJsonStr): 'headers': ' '.join(signedHeaderKeys), 'signature': signature } - signatureHeader = ','.join( + signatureHeader = ', '.join( [f'{k}="{v}"' for k, v in signatureDict.items()]) @@ -172,7 +172,7 @@ def post(): r = requests.post('https://post.lurk.org/inbox', json=json_message, headers=signed_headers) - html = f'Status code
{r.status_code}

Response Headers:
{r.headers}


json message:
{json.dumps(json_message)}


Request headers:
{signed_headers}
' + html = f'Status code
{r.status_code}

Response Headers:
{r.headers}


json message:
{r.request.body}


Request headers:
{r.request.headers}
' html_headers = f'{html}' return html_headers