Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/LucaXGit/proyecto-final-jaz/llms.txt

Use this file to discover all available pages before exploring further.

Sending a GET request to the ProductoServlet endpoint retrieves all t-shirt products currently stored in the database. The servlet executes SELECT * FROM productos and serializes the result set as a JSON array. No query parameters or request body are required.

Request

Method: GET
URL: http://localhost:8080/ServidorTiendaPlayeras/ProductoServlet
No parameters are accepted or required for this endpoint.

curl Example

curl http://localhost:8080/ServidorTiendaPlayeras/ProductoServlet

PHP (Laravel) Example

$response = Http::get($this->apiUrl);

Response

The response is a JSON array of Producto objects. Each element in the array represents one product row from the productos table.
[
  {
    "id": 1,
    "nombre": "Playera Oversize Anime",
    "talla": "M",
    "precio": 299.90,
    "stock": 15
  },
  {
    "id": 2,
    "nombre": "Playera Básica Blanca",
    "talla": "G",
    "precio": 149.50,
    "stock": 0
  }
]

Response Fields

id
integer
The unique auto-increment identifier for the product.
nombre
string
The product name.
talla
string
The t-shirt size. One of: CH, M, G, XG.
precio
number
The price in Mexican Pesos (MXN).
stock
integer
The number of units currently in inventory. Products with stock: 0 are out of stock but remain in the catalog.
If the database contains no products, the endpoint returns an empty array []. Server-side errors (e.g., a lost database connection) also return [] — the exception is logged on the server but not surfaced in the response body.

Build docs developers (and LLMs) love