リクエストボディ

コンテンツタイプごとのリクエストボディの解析。型付きのエンドポイントは自分の Content-Type だけを受け付け(それ以外は 415)、解析結果を返します。/any は内容の形式を判別し、/large は 10MB までのアップロードを計測します。

あなたのアカウントでこれらのエンドポイントが使えます。各エンドポイントのページの Try it でリクエストを送れます。

これらのエンドポイントには無料アカウントが必要です。アカウントを作成するかサインインすると、詳細を見てここで試せます。

リクエストの例

Detects a body's real type from its content and compares it with the declared Content-Type. 完全なリファレンスと Send ボタン(英語).

cURL
curl -X POST "https://api.testingapis.com/api/bodies/any" \
  -H "Content-Type: application/json" \
  -d '{"hello": "world"}'
レスポンス · 200 OK
{
  "method": "POST",
  "declaredContentType": "application/json",
  "detectedType": "application/json",
  "matchesDeclared": true,
  "length": 18,
  "sha256": "5f8f04f6a3a892aaabbddb6cf273894493773960d4a325b105fee46eef4304f1"
}

サインインして詳細を見る

これらのエンドポイントのパラメータ、リクエストとレスポンスの例、ライブの Try it パネルは、サインインしたメンバー向けです。アカウントは無料で、数秒で作成できます。