TestingAPIs is still being built. If something breaks, email support@testingapis.com.

Parses a URL-encoded or multipart form

POSThttps://api.testingapis.com/api/bodies/formSign in to see this endpoint's URL

Repeated keys come back as arrays. Each uploaded file is reported with its size and SHA-256.

Request body

Optional. application/x-www-form-urlencoded, multipart/form-data. Any form fields.

Example body
name=Ada&role=admin

Responses

200
Encoding, fields and file metadata.
415
Content-Type is not application/x-www-form-urlencoded or multipart/form-data.

Example

Request
curl -X POST "https://api.testingapis.com/api/bodies/form" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode "name=Ada" --data-urlencode "role=admin" \
  -H "X-TestingApis-Key: YOUR_API_KEY"
Response200 OK
{
  "contentType": "application/x-www-form-urlencoded",
  "encoding": "urlencoded",
  "fields": {"name": "Ada", "role": "admin"},
  "files": []
}

Sign in to see the details

The parameters, request and response examples and the live Try it panel for this endpoint are for signed-in members. Accounts are free and take a few seconds to create.