12 lines
441 B
Python
12 lines
441 B
Python
import urllib.request
|
|
import urllib.error
|
|
|
|
req = urllib.request.Request('https://trimape.mx/contacto-action', data=b'nombre=Test&email=test@test.com&ciudad=Test&telefono=123&descripcion=test')
|
|
try:
|
|
res = urllib.request.urlopen(req)
|
|
print("STATUS:", res.getcode())
|
|
print("BODY:", res.read().decode('utf-8'))
|
|
except urllib.error.HTTPError as e:
|
|
print("ERROR STATUS:", e.code)
|
|
print("ERROR BODY:", e.read().decode('utf-8'))
|