Cuerpos de petición
Análisis del cuerpo de la petición según el tipo de contenido. Los endpoints tipados solo aceptan su propio Content-Type (si no, 415) e informan de lo que analizaron; /any detecta el formato del contenido; /large mide subidas de hasta 10MB.
Tu cuenta desbloquea estos endpoints. Usa Try it en la página de cada endpoint para enviar peticiones.
Estos endpoints necesitan una cuenta gratuita. Crea una o inicia sesión para ver sus detalles y probarlos aquí.
- POSTPUTPATCH
https://api.testingapis.com/api/bodies/anyDetects a body's real type from its content and compares it with the declared Content-TypeDetects a body's real type from its content and compares it with the declared Content-Type. - POST
https://api.testingapis.com/api/bodies/binaryReads a binary body and returns its size, hashes and detected typeReads a binary body and returns its size, hashes and detected type. - POST
https://api.testingapis.com/api/bodies/formParses a URL-encoded or multipart formParses a URL-encoded or multipart form. - POST
https://api.testingapis.com/api/bodies/jsonParses a JSON body and describes its structureParses a JSON body and describes its structure. - POST
https://api.testingapis.com/api/bodies/largeStreams an upload of up to 10MB and reports its size, hash and timingStreams an upload of up to 10MB and reports its size, hash and timing. - POST
https://api.testingapis.com/api/bodies/textReads a plain-text body and counts its bytes, characters, lines and wordsReads a plain-text body and counts its bytes, characters, lines and words. - POST
https://api.testingapis.com/api/bodies/xmlParses an XML body into an element treeParses an XML body into an element tree.
Petición de ejemplo
Detects a body's real type from its content and compares it with the declared Content-Type. Referencia completa y botón Send (en inglés).
curl -X POST "https://api.testingapis.com/api/bodies/any" \
-H "Content-Type: application/json" \
-d '{"hello": "world"}'{
"method": "POST",
"declaredContentType": "application/json",
"detectedType": "application/json",
"matchesDeclared": true,
"length": 18,
"sha256": "5f8f04f6a3a892aaabbddb6cf273894493773960d4a325b105fee46eef4304f1"
}Inicia sesión para ver los detalles
Los parámetros, los ejemplos de petición y respuesta y el panel Try it en vivo de estos endpoints son para miembros con sesión iniciada. Las cuentas son gratuitas y se crean en unos segundos.