When do we use request body such as raw, form-data, x-www-form-urlencoded, read from file, read from field, binary, GraphQL(Beta) in Advanced REST Client?
Below is a structured explanation of Request Body options in Advanced REST Client (ARC) and when each should be used:
1. None
Select this when the API does not require a request body.
Typically used with GET requests or APIs where parameters are passed only in headers or query parameters.
2. Raw
Used when sending structured content such as Text, HTML, XML, or JSON.
-
You can directly write the payload.
-
Fields can be inserted using navigator (double-click).
-
Template placeholders supported:
-
?{fieldname} -
${environment_variable}
-
-
When substituting string values, ensure they are enclosed in double quotes (“”).
Common use case: JSON payload for POST/PUT APIs.
3. form-data
Used to send multipart/form-data.
Recommended when:
-
Uploading files
-
Sending non-ASCII text
-
Sending large binary data along with parameters
Configuration columns:
-
Key Type (Text/File)
-
Key
-
Value
-
Value Field
-
Description
4. x-www-form-urlencoded
Used to send simple ASCII key-value pairs.
Commonly used for:
-
Login APIs
-
Token generation APIs
-
Simple form submissions
Configuration columns:
-
Key
-
Value
-
Description
5. Read from File
Used when the entire request body needs to be read from a file.
Configuration:
-
Content-Type for request body
-
File Path
-
Option to view file content
Useful for:
-
Large JSON/XML payloads
-
Static request templates stored externally
6. Read from Field
Used when the request body is dynamically stored in a field during runtime.
Configuration:
-
Content-Type
-
Field Name (contains raw request body text)
Recommended when payload is generated earlier in the process.
7. Binary
Used when sending raw binary content directly from a file.
Typical use case:
- PDF, image, ZIP upload where API expects binary stream
8. GraphQL (Beta)
Used when interacting with GraphQL APIs.
You must specify:
-
GraphQL Query (query or mutation)
-
GraphQL Variables (optional dictionary for dynamic values)
Fields can be inserted using navigator or template placeholders.
Ensure string substitutions are enclosed in double quotes.
Limitation: Subscription queries are not supported in ARC GraphQL