Build a cURL command for a JSON status request
Admin ·
A status service expects a POST with a batch number and a list of packing labels. Build the request using an example host, then check how the shell passes each field.
Build a JSON status request
Select Load example. The URL is https://api.example.com/v1/status?view=brief and the method is POST. The Content-Type header is application/json. The X-Report-Name value is O'Brien shift.
Choose Build cURL command. The output passes the body using --data-raw, so cURL selects POST. The JSON contains batch 9007199254740993, two labels and an empty note.
Inspect the quoted arguments
The shell command splits the O'Brien header value around the apostrophe, inserts an escaped literal apostrophe and joins the parts as one argument. The other single-quoted fields keep their literal characters.
The first cURL option is --disable, which skips cURL’s default configuration file. The following --globoff treats the URL as a single URL. Without Follow redirects, the command omits --location.
Export and review the command
Choose Copy output or Download curl-command.sh. Compare the preview and the exported text before replacing the example URL with an endpoint you are authorized to use.
If you include a body without a Content-Type header, the command explicitly uses application/x-www-form-urlencoded. For JSON, supply Content-Type: application/json as in the example.
Common questions
Can I add a header with an empty value?
Yes. Enter the header name followed by a colon. The command emits cURL’s semicolon form for an empty header.
Can I pass a reference to a local file as the body?
This builder uses literal body text. A leading @ in the body is kept as data by --data-raw.