# call_url

**Descripción**

Utiliza el módulo request para obtener el contenido de la URL.

**Parámetros**

<table border="1" id="bkmrk-module-acepta-el-tip" style="height: 191px; width: 515px;"><tbody><tr style="height: 29px;"><td style="width: 77px; height: 29px;"><div><div>**Nombre**</div></div></td><td style="width: 77px;"><div><div>**Tipo**</div></div></td><td style="width: 361px; height: 29px;">**Descripción**</td></tr><tr style="height: 29px;"><td style="height: 29px; width: 77px;"><div><div>url</div></div></td><td style="width: 77px;"><div><div>str</div></div></td><td style="height: 29px; width: 361px;">Url objetivo.</td></tr><tr style="height: 29px;"><td style="height: 29px; width: 77px;"><div><div>authtype</div></div></td><td style="width: 77px;"><div><div>str</div></div></td><td style="height: 29px; width: 361px;">ntlm', 'basic', 'digest'. Opcional.</td></tr><tr style="height: 46px;"><td style="width: 77px; height: 46px;"><div><div><div><div>user</div></div></div></div></td><td style="width: 77px;"><div><div><div><div>str</div></div></div></div></td><td style="width: 361px; height: 46px;">Usuario de autenticación. Opcional.</td></tr><tr style="height: 29px;"><td style="width: 77px; height: 29px;"><div><div><div><div>passw</div></div></div></div></td><td style="width: 77px;"><div><div><div><div>str</div></div></div></div></td><td style="width: 361px; height: 29px;">Contraseña de autenticación. Opcional.</td></tr><tr style="height: 29px;"><td style="width: 77px; height: 29px;"><div><div>time_out</div></div></td><td style="width: 77px;"><div><div>int</div></div></td><td style="width: 361px; height: 29px;">Time out para la llamada.</td></tr></tbody></table>

**Return**

<table border="1" id="bkmrk-output-salida-de-la-" style="border-collapse: collapse; width: 100%;"><tbody><tr><td style="width: 50%;">**Tipo**</td><td style="width: 50%;">**Descripción**</td></tr><tr><td style="width: 50%;">str</td><td style="width: 50%;">Salida de la petición request.</td></tr></tbody></table>

**Requisitos**

- <div><div><div>requests.sessions.Session</div></div></div><div>  
    </div>

**Versión**

- 1.0.0

**Ejemplo**

```
import pandoraPlugintools as pt

# Define URL and authentication details
url = 'https://api.com/api/data'
authtype = 'basic'
user = 'admin'
passw = 'S4!jdKm'

# Call the URL and get the contents
response = pt.call_url(url, authtype=authtype, user=user, passw=passw, timeout=5, verify=True, print_errors=True)

# Print the response content
if response is not None:
    print(response.decode('utf-8'))
else:
    print("Error occurred during URL call.")
```