Sending aDocumentation 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.
PUT request to the ProductoServlet endpoint updates all fields of an existing product identified by its id. All parameters are passed as query-string values rather than a request body — this is intentional, because Tomcat’s built-in servlet infrastructure does not parse PUT request bodies as form parameters, making query strings the most reliable approach for passing data through doPut().
Request
Method:PUTURL:
http://localhost:8080/ServidorTiendaPlayeras/ProductoServlet?id={id}&nombre={nombre}&talla={talla}&precio={precio}&stock={stock}
Parameters
The primary-key ID of the product to update.
The new product name. URL-encode any spaces or special characters (e.g., use
%20 or + for spaces).The new t-shirt size. Accepted values:
CH, M, G, XG.The new price in Mexican Pesos (MXN). Parsed server-side as a
double.The new inventory count. Parsed server-side as an
int.curl Example
PHP (Laravel) Example
ThePlayerasController::update() method builds the query string manually, using urlencode() on nombre to handle special characters:
SQL Executed
Response
true if the UPDATE statement executed successfully; false if the update failed (e.g., no row with the given id exists, or a database error occurred).All five parameters —
id, nombre, talla, precio, and stock — are required. Omitting id, precio, or stock will cause a NumberFormatException on the server when the servlet attempts to parse the missing value, resulting in {"success": false}.