Recently I was integrating an email api, and I was able to find the sample snippets in curl and other languages as well.That’s cool!
But the API reference page did not mention the Content Type that their api’s accept.What do you accept ?
Ofcourse the curl snippets that they provided use -F flag which signifies multipart/form-data.
And -d in curl signifies application/x-www-form-urlencoded.
When sending files, you use multipart/form-data.
Does that mean we cannot use application/x-www-form-urlencoded to send files to an api ? You can as per this but its inefficient and not the preferred way.
I did not look into the http spec as such.