Answers for "python post request socket send json"

0

post request socket python

from socket import socket,error
headers = """GET http://www.google.com HTTP/1.1
                Host: www.google.comrnrn"""
try:
  s = socket()
  s.connect((host,int(port)))
  s.settimeout(4)
  s.send(headers.encode())
  s.recv(800)
  s.close()
except error:
  s.close()
Posted by: Guest on March-11-2021

Code answers related to "python post request socket send json"

Python Answers by Framework

Browse Popular Code Answers by Language