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
{{ message }}
Repository navigation
Support -F / --form in the Multipart parameters #1744
(HTTP SMTP IMAP) For HTTP protocol family, this lets curl emulate a filled-in form in which a user has pressed the submit button. This causes curl to POST data using the Content-Type multipart/form-data according to RFC 2388.
For SMTP and IMAP protocols, this is the means to compose a multipart mail message to transmit.
This enables uploading of binary files etc. To force the 'content' part to be a file, prefix the file name with an @ sign. To just get the content part from a file, prefix the file name with the symbol <. The difference between @ and < is then that @ makes a file get attached in the post as a file upload, while the < makes a text field and just get the contents for that text field from a file.
Tell curl to read content from stdin instead of a file by using - as filename. This goes for both @ and < constructs. When stdin is used, the contents is buffered in memory first by curl to determine its size and allow a possible resend. Defining a part's data from a named non-regular file (such as a named pipe or similar) is unfortunately not subject to buffering and will be effectively read at transmission time; since the full size is unknown before the transfer starts, such data is sent as chunks by HTTP and rejected by IMAP.
Example: send an image to an HTTP server, where 'profile' is the name of the form-field to which the file portrait.jpg will be the input:
I know what is the issue with FreshDesk API and it has nothing to do with supporting multipart form data parameters as they are supported for many years.
Activity
[-]Support `-f` / `--form` in the Multipart parameters[/-][+]Support `-F` / `--form` in the Multipart parameters[/+]alexeyzimarev commentedon Feb 10, 2022
Can you explain what that
-Fthing does? I am a bit confused as the request in Postman looks like JSON, not a form.dariusz-wozniak commentedon Feb 10, 2022
In the Postman, the current selection is a
form-data.There's also a Code snippet view; for RestSharp the generated code (that doesn't work) is as the following (sensitive data removed):
On the
-F(source: https://curl.se/docs/manpage.html#-F):alexeyzimarev commentedon Feb 11, 2022
Here's what I did:
And that's how the request looks like:
It's hard for me to guess what exactly FreshDesk is unhappy about as the request looks completely legit.
alexeyzimarev commentedon Feb 11, 2022
I know what is the issue with FreshDesk API and it has nothing to do with supporting multipart form data parameters as they are supported for many years.