[Feature request] Multiple --data options without &-symbol
"Borja Iñesta Hernández (UPV)" via curl-users <[email protected]>
| Newsgroups | gmane.comp.web.curl.general |
|---|---|
| Message-ID | <[email protected]> |
Hello! Currently, when specifying more than one --data options with curl, the data pieces specified are merged with a separating &-symbol. While creating a request for a 3GPP API, I had the need of mixing JSON data with binary data in a multipart/related content-type request and each time a --data option is used, the data is joined by the & symbol, making the request useless. Example: curl --http2-prior-knowledge \ --request POST \ --header "Content-Type: multipart/related; boundary=‘=-myboundary=='" \ --data-binary $'--=-myboundary==\r\nContent-Type: application/json\r\n\r\n' \ --data @data.json \ --data-binary $'\r\n--=-myboundary==\r\nContent-Type: application/vnd.3gpp.5gnas\r\n\r\n' \ --data-binary @nas_pdu.bin \ --data-binary $'\r\n--=-myboundary==--\r\n' \ webserver:80/resource I thought something like this could be useful in some environments, like specifying the request like this and not having the data parts merged with & by adding a special option like --avoid-merge. -- Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users Etiquette: https://curl.se/mail/etiquette.html