Skip to content

Commit 7cce618

Browse files
authored
Merge pull request #58 from brentru/fix-ssl-examples
Fix examples for ESP32SPI + SSL socket
2 parents c070f6e + 6c18a02 commit 7cce618

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

examples/requests_advanced.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
# Initialize a requests object with a socket and esp32spi interface
4141
socket.set_interface(esp)
42-
requests.set_socket(socket)
42+
requests.set_socket(socket, esp)
4343

4444
JSON_GET_URL = "http://httpbin.org/get"
4545

@@ -59,8 +59,5 @@
5959
print("Response HTTP Status Code: ", response.status_code)
6060
print("-" * 60)
6161

62-
# Read Response, as raw bytes instead of pretty text
63-
print("Raw Response: ", response.content)
64-
6562
# Close, delete and collect the response data
6663
response.close()

examples/requests_simpletest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
# Initialize a requests object with a socket and esp32spi interface
4242
socket.set_interface(esp)
43-
requests.set_socket(socket)
43+
requests.set_socket(socket, esp)
4444

4545
TEXT_URL = "http://wifitest.adafruit.com/testwifi/index.html"
4646
JSON_GET_URL = "http://httpbin.org/get"

0 commit comments

Comments
 (0)