curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: [Feature request] Multiple --data options without &-symbol

From: Borja Iñesta Hernández via curl-users <curl-users_at_lists.haxx.se>
Date: Thu, 26 Oct 2023 10:40:37 +0200

El 25/10/2023 a las 23:25, Daniel Stenberg escribió:

> On Wed, 25 Oct 2023, "Borja Iñesta Hernández (UPV)" via curl-users wrote:
>
>> 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.
>
> That looks like you're manually doing what -F does, which... seems
> non-optimal!
>
You are right! I thought the multipart/form-data was a different kind of
encoding or something. It worked fine with the following request:

curl --http2-prior-knowledge \
   --request POST \
   --header "Content-Type: multipart/related" \
   --form 'jsonData=<data.json;type=application/json' \
   --form
'binaryDataN1SmMessage=<nas_pdu.bin;type=application/vnd.3gpp.5gnas;headers="Content-Id:
5gnas-sm"' \
webserver:80/resource

Thanks for the help!

-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2023-10-26