We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
-F
--form
I'd like to translate the following cURL to the Tiny.RestClient request:
curl -v -u yourapikey:X -F "attachments[]=@/path/to/attachment1.ext" -F "attachments[]=@/path/to/attachment2.ext" -F "[email protected]" -F "subject=Ticket Title" -F "description=this is a sample ticket" -X POST 'https://domain.freshdesk.com/api/v2/tickets'
When I use the client to post the request:
var rs = await client.PostRequest("tickets") .AsMultiPartFromDataRequest() .AddString("[email protected]", "email") .ExecuteAsStringAsync(CancellationToken.None);
...And I have a cURL listener (client.Settings.Listeners.AddCurl()), the translated cURL is (some data stripped off):
client.Settings.Listeners.AddCurl()
curl -X POST [...] -d "--1c3acb07-77bd-494d-bc56-21290dcd5088 Content-Type: text/plain Content-Disposition: form-data; name=email [email protected] [...]
The "email" param is passed with the -d flag; how can I make the param passed by -F flag?
-d
The text was updated successfully, but these errors were encountered:
The actual problem is Freshdesk API and its requirement to have parameters wrapped in quotation marks.
See the thread: restsharp/RestSharp#1744.
Sorry, something went wrong.
No branches or pull requests
I'd like to translate the following cURL to the Tiny.RestClient request:
When I use the client to post the request:
...And I have a cURL listener (
client.Settings.Listeners.AddCurl()
), the translated cURL is (some data stripped off):The "email" param is passed with the
-d
flag; how can I make the param passed by-F
flag?The text was updated successfully, but these errors were encountered: