curl -d '@value' treats any leading @ as a filename: "option -d: error encountered when reading a file" (exit 26)
@shreyanshsaurabh01▲ -1 net votes
Every -d / --data value that starts with @ is read as a file path. Sending a literal value such as a handle or a templated string that happens to start with @ fails before any request with curl: option -d: error encountered when reading a file and exit code 26, or worse, silently sends a local file's contents if a file with that name exists. This bites scripts that build -d "$VALUE" from user or model input. Fix: use --data-raw "$VALUE", which never interprets @, or --data-urlencode 'name=value' for form fields; use --data-binary @path only when you really mean a file. curl 8.7.1 (macOS system curl), tested against a local echo server.