← Back to Overview

HTTP CLIENT

Request Body

API Studio supports 7 body types. Select from the dropdown in the Body tab. Each type has a dedicated editor with syntax highlighting, variable resolution, and inline comment support.

Body type dropdown showing all 7 options

Body Types at a Glance

TypeContent-TypeEditorUse Case
none(removed)GET requests, no body
jsonapplication/jsonCodeMirror 6 (JSON mode)REST APIs, most common
form-data(auto with boundary)Key-value rows + file pickerFile uploads, multipart
x-www-form-urlencodedapplication/x-www-form-urlencodedKey-value rowsSimple form submissions
rawtext/plainCodeMirror 6 (raw mode)Plain text payloads
xmlapplication/xmlCodeMirror 6 (XML mode)SOAP, XML-based APIs
graphqlapplication/jsonCodeMirror 6 (GraphQL + JSON)GraphQL queries & mutations
binaryapplication/octet-streamFile pickerBinary file uploads

JSON

The most common body type. Uses a CodeMirror 6 editor with:

JSON syntax highlighting with error indicators
{{variable}} tokens colored by source (green = env, blue = vault, orange = unresolved)
Inline comment support (// and /* */) — stripped before sending
Ctrl+F search with scrollbar match highlights
A-/A+ zoom controls per editor instance
Paste JS objects — auto-converted to valid JSON on paste

Example with comments and variables:

{
  // User creation payload
  "name": "{{user_name}}",
  "email": "{{user_email}}",
  "role": "admin",
  /* Temporary fields for testing
  "debug": true,
  "trace_id": "abc-123"
  */
}

Comments are stripped before sending — the server receives valid JSON.

Form Data (multipart)

For file uploads and multipart form submissions. Each row is either a text field or a file field.

Text fields — Key-value pairs sent as form text
File fields — Click to pick a file from disk via VS Code file dialog
MIME detection — Correct Content-Type set per file part automatically (via extension)
Enable/disable — Toggle individual rows without deleting them
No Content-Type header — Omitted intentionally; fetch auto-sets it with the correct multipart boundary

Note: Unresolved file fields show a ⚠ warning. Clicking Send with unresolved files shows an error toast — pick the file first.

URL Encoded

Simple key-value pairs encoded as key1=value1&key2=value2. Same row editor as form-data but without file fields.

Values support {{variable}} interpolation. Special characters are URL-encoded automatically.

Raw & XML

Raw

Plain text editor. Content-Type set to text/plain. Supports // and /* */ comments.

XML

XML-highlighted editor. Content-Type set to application/xml. Supports <!-- --> comments.

Binary

Upload a single binary file as the request body. Click "Choose File" to pick from disk.

Content-Type defaults to application/octet-stream (editable in Headers tab)
Shows file name and size after selection
Useful for image/PDF/protobuf uploads

GraphQL

Splits into two editors: Query (GraphQL syntax) and Variables (JSON). Sent as application/json with { "query": "...", "variables": {...} }.

Schema-aware autocomplete when schema is fetched (Ctrl+Space)
Inline lint squiggles for invalid fields or wrong argument types
Query uses # comments; Variables use // /* */
Multi-operation picker — operationName included when document has multiple operations

See the full GraphQL documentation for schema loading, query builder, and subscriptions.

Inline Comments

Comment out lines to temporarily exclude them from the request. Comments are syntax-highlighted (dimmed) and automatically stripped before sending.

Body TypeComment Syntax
JSON / Raw// single-line    /* multi-line */
XML<!-- comment -->
GraphQL Query# single-line
GraphQL Variables// single-line    /* multi-line */

Content-Type Auto-Sync

When you change the body type dropdown, the Content-Type header is automatically updated. A toast notification shows when it changes.

Body TypeContent-Type SetNote
none(removed)Header deleted
jsonapplication/json
rawtext/plain
xmlapplication/xml
graphqlapplication/jsonSent as JSON payload
x-www-form-urlencodedapplication/x-www-form-urlencoded
form-data(removed)Auto-set by fetch with boundary
binaryapplication/octet-stream

You can freely edit the Content-Type header after the auto-sync — no further automatic changes will overwrite your manual edit until you switch body types again.

Next

Ko-fi