Skip to content

Commit 6e5ab8f

Browse files
authored
Merge pull request #86 from docusign/DEVDOCS-8269
separated headers from api call
2 parents a2c7ddb + b9e731c commit 6e5ab8f

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

app/eSignature/examples/eg010_send_binary_docs.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,15 @@ def worker(cls, args):
102102

103103
# Step 2. call Envelopes::create API method
104104
# Exceptions will be caught by the calling function
105-
results = requests.post(
106-
url=f"{args['base_path']}/v2.1/accounts/{args['account_id']}/envelopes",
107-
headers={
105+
headers = {
108106
"Authorization": "bearer " + args['access_token'],
109107
"Accept": "application/json",
110108
"Content-Type": f"multipart/form-data; boundary={boundary.decode('utf-8')}"
111-
},
109+
}
110+
111+
results = requests.post(
112+
url=f"{args['base_path']}/v2.1/accounts/{args['account_id']}/envelopes",
113+
headers=headers,
112114
data=req_body
113115
)
114116
return {"status_code": results.status_code, "results": results.json()}

0 commit comments

Comments
 (0)