File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -18,10 +18,10 @@ def main(use_stream=False):
18
18
# MicroPython socket objects support stream (aka file) interface
19
19
# directly, but the line below is needed for CPython.
20
20
s = s .makefile ("rwb" , 0 )
21
- s .write (b"GET / HTTP/1.0\n \n " )
21
+ s .write (b"GET / HTTP/1.0\r \n \r \n " )
22
22
print (s .readall ())
23
23
else :
24
- s .send (b"GET / HTTP/1.0\n \n " )
24
+ s .send (b"GET / HTTP/1.0\r \n \r \n " )
25
25
print (s .recv (4096 ))
26
26
27
27
s .close ()
Original file line number Diff line number Diff line change @@ -24,12 +24,12 @@ def main(use_stream=True):
24
24
if use_stream :
25
25
# Both CPython and MicroPython SSLSocket objects support read() and
26
26
# write() methods.
27
- s .write (b"GET / HTTP/1.0\n \n " )
27
+ s .write (b"GET / HTTP/1.0\r \n \r \n " )
28
28
print (s .read (4096 ))
29
29
else :
30
30
# MicroPython SSLSocket objects implement only stream interface, not
31
31
# socket interface
32
- s .send (b"GET / HTTP/1.0\n \n " )
32
+ s .send (b"GET / HTTP/1.0\r \n \r \n " )
33
33
print (s .recv (4096 ))
34
34
35
35
s .close ()
You can’t perform that action at this time.
0 commit comments