Corpos de requisição
Análise do corpo da requisição por tipo de conteúdo. Os endpoints tipados só aceitam o próprio Content-Type (senão, 415) e informam o que analisaram; /any detecta o formato do conteúdo; /large mede uploads de até 10MB.
Sua conta libera estes endpoints. Use Try it na página de cada endpoint para enviar requisições.
Estes endpoints precisam de uma conta gratuita. Crie uma ou entre para ver os detalhes e testá-los aqui.
- 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.
Requisição de exemplo
Detects a body's real type from its content and compares it with the declared Content-Type. Referência completa e botão Send (em 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"
}Entre para ver os detalhes
Os parâmetros, os exemplos de requisição e resposta e o painel Try it ao vivo de estes endpoints são para membros conectados. As contas são gratuitas e levam poucos segundos para criar.