Corps de requête
Analyse du corps de requête selon le type de contenu. Les points d’accès typés n’acceptent que leur propre Content-Type (sinon 415) et indiquent ce qu’ils ont analysé ; /any détecte le format du contenu ; /large mesure les envois jusqu’à 10MB.
Votre compte débloque ces points d’accès. Utilisez Try it sur la page de chaque point d’accès pour envoyer des requêtes.
Ces points d’accès demandent un compte gratuit. Créez-en un ou connectez-vous pour voir leurs détails et les essayer ici.
- 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.
Exemple de requête
Detects a body's real type from its content and compares it with the declared Content-Type. Référence complète et bouton Send (en anglais).
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"
}Connectez-vous pour voir les détails
Les paramètres, les exemples de requête et de réponse et le panneau Try it en direct pour ces points d’accès sont réservés aux membres connectés. Les comptes sont gratuits et se créent en quelques secondes.