The request body allows you to send various payloads along with your request. In the REST API Playground, you can utilize different body types to structure and format your data. Here are the available body types:
When making a request with a body in the REST API Playground, you can specify the custom content type from the Header Panel if it's required for your server configuration.
This body type is commonly used when submitting forms or uploading files through an API. It allows you to include multiple fields with corresponding values within the request body.
Url Encoded Form is used to send data in key-value pairs, similar to how form data is sent in HTML forms. The data is encoded in the URL format.
If you're working with a GraphQL API, you can use the GraphQL Query body type to write and execute GraphQL queries. It allows you to specify the query, variables, and operation name.
XML (eXtensible Markup Language) is another data format commonly used in web services. The XML body type allows you to send XML-formatted data as the request payload.
The Text body type is used to send plain text content in the request body. It can be useful when working with APIs that expect text-based data.
The Binary body type is used to send binary data in the request body. It is commonly used for file uploads or when working with APIs that require binary content.
By selecting the appropriate body type in the REST API Playground, you can structure and send your data in the desired format, ensuring compatibility with your API endpoints.