You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Found a solution to my own issue, thanks to a combination of two factors:
there are inconsistencies between how curlie and curl handle POST requests. This only happens when passing data using the -d option (but not when passing --data!). In fact, my same curlie command, using --data instead of -d, fails. This is a documented issue: Difference in (-d) parsing between curlie and curl #11
Fortunately, curlie has a nice --curl option, which prints out the curl command instead of executing it.
I was able to infer that, in specific cases (like the one mentioned in 1. above), curlie injects additional Content-Type and Accept headers in the request, and thanks the extra headers the request succeeded.
In my specific case, it was just a matter of adding -H 'Content-Type: application/json' -H 'Accept: application/json, */*' to the curl command:
I am trying to run a POST request in vanilla cURL, but failing at it. I can easily run it in curlie (I expect the 500):
But the exact same command in vanilla cURL won't work:
Can someone help me understand why?
The text was updated successfully, but these errors were encountered: