The --data-raw option takes some interpretation. The curl docs do not state that it is mutually exclusive from --data. From a quick tests, it seems curl merges the data when called with both --data and --data-raw.
With that said, the common use case for --data-raw seems to be independent. When passed alone, this is the exact data to send in the request payload.
This PR adds support for --data-raw to the specification above - parsing it as form data when mixed with --data or sending it as the raw body when used independently.
I thought it was optional based on the content type of the request. However, looks like it's not. I'll need to revisit this as I use withBody in two spots.
The
--data-raw
option takes some interpretation. Thecurl
docs do not state that it is mutually exclusive from--data
. From a quick tests, it seemscurl
merges the data when called with both--data
and--data-raw
.With that said, the common use case for
--data-raw
seems to be independent. When passed alone, this is the exact data to send in the request payload.This PR adds support for
--data-raw
to the specification above - parsing it as form data when mixed with--data
or sending it as the raw body when used independently.