actually pass signature and related headers to activity_request()
This commit is contained in:
parent
06acbcfb98
commit
ca68b27ccd
2 changed files with 6 additions and 4 deletions
|
@ -50,6 +50,8 @@ class Inbox(object):
|
|||
sign_headers.insert(0, ["(request-target)", "post %s" % parts.path])
|
||||
signature = ap_security.signature(private_key, sign_headers)
|
||||
|
||||
return ap_utils.activity_request(self._url, activity.format(sender),
|
||||
method="POST")
|
||||
headers.append(["signature", signature])
|
||||
|
||||
return ap_utils.activity_request(self._url, activity.format(sender),
|
||||
method="POST", headers=headers)
|
||||
|
||||
|
|
|
@ -14,9 +14,9 @@ def split_username(s):
|
|||
return username, instance
|
||||
return None, None
|
||||
|
||||
def activity_request(url, data=None, method="GET", type=ACTIVITY_TYPE):
|
||||
def activity_request(url, data=None, method="GET", type=ACTIVITY_TYPE,
|
||||
headers={}):
|
||||
content_type = None
|
||||
headers = {}
|
||||
|
||||
if method == "POST":
|
||||
content_type = type
|
||||
|
|
Loading…
Reference in a new issue