Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python request port

#Well, I was missing the basis.
#When you perform an HTTP request, requests will try to connect on port 80.
#For HTTPS, requests will try to connect on port 443.
#If you want an exotic port such as 8080 this is how you should do it :

resp = requests.get(http://example.com:8080)
 
PREVIOUS NEXT
Tagged: #python #request #port
ADD COMMENT
Topic
Name
6+2 =