Basic
Esta página todavía no se ha traducido — se muestra en su idioma original:English
Introduction
HTTPX is a powerful and user-friendly HTTP client that allows developers to make HTTP requests with ease.
It offers support for asynchronous programming, HTTP/2, and connection pooling.
Getting Started
Clone the httpx-basic project:
git clone https://gitlab.com/xtec/python/httpx-basic.gitStart the FastAPI server:
cd httpx-basic
uv run app/main.pyOpen the client.py file that is on the project root:
=
=
This script imports the httpx package and makes a GET request to the endpoint http://localhost:8000/person/1
Run this script; you should observe output similar to the following:
"id": 1,
"name": "David",
"surname": "de Mingo"
}Estás leyendo una vista previa.
Inicia sesión para leer el artículo completo. Cualquier cuenta abre 4 artículos gratuitos al mes; el alumnado y el profesorado leen las páginas de su curso sin límite.
Iniciar sesión