Skip to content

Commit 7508d3c

Browse files
authored
Update sample scripts (#15)
Signed-off-by: Denis Makogon <[email protected]>
1 parent 7070e51 commit 7508d3c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

samples/python-requests/cloudevent_to_request.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,9 @@ def run_binary(event, url):
2929
print("binary CloudEvent")
3030
for k, v in binary_headers.items():
3131
print("{0}: {1}\r\n".format(k, v))
32-
print(binary_data.getvalue())
33-
response = requests.post(url,
34-
headers=binary_headers,
35-
data=binary_data.getvalue())
32+
print(binary_data)
33+
response = requests.post(
34+
url, headers=binary_headers, data=binary_data)
3635
response.raise_for_status()
3736

3837

0 commit comments

Comments
 (0)