File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -444,8 +444,8 @@ def _safe_hint(s):
444444 raise e
445445
446446 # Post the webhook over Ziti
447- headers = { ' Content-Type' : 'application/ json' }
448- data = mwb .dumpJson ()
447+ # Build dict payload; requests will set Content-Type when using json=
448+ payload = mwb .body
449449
450450 with openziti .monkeypatch ():
451451 # Load the identity inside the context so that the same owner tears down
@@ -462,8 +462,8 @@ def _safe_hint(s):
462462 r = None
463463 try :
464464 session = requests .Session ()
465- print (f"Posting webhook to { url } with headers { headers } and data { data } " )
466- r = session .post (url , headers = headers , data = data )
465+ print (f"Posting webhook to { url } with JSON payload keys { list ( payload . keys ()) } " )
466+ r = session .post (url , json = payload )
467467 print (f"Response Status: { r .status_code } " )
468468 print (r .headers )
469469 print (r .content )
You can’t perform that action at this time.
0 commit comments