Buy commercial curl support from WolfSSL. We help you work
out your issues, debug your libcurl applications, use the API, port to new
platforms, add new features and more. With a team lead by the curl founder
himself.
AW: AW: curl -d in powershell
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Oeckinghaus, Christian via curl-users <curl-users_at_lists.haxx.se>
Date: Tue, 29 Mar 2022 14:04:58 +0000
Did you test that?
For me it's not working. _at_ and {} are special character in Powershell. I don’t think you can use them like you proposed.
> I'm trying to use a REST service using Windows mingw/curl. GET works
> nicely on that REST service (HTTP 200), but not POST. If I'm using
> Linux/curl, everything works nicely and I get HTTP 200 for both GET
> and POST. Using Windows mingw/curl, I always get HTTP 302 if using
> POST. Unfortunately, I need to get it working on Windows. I tried
> different variations of using -d parameter as I wrote before, but no
> avail. First sample is adapted from swagger UI for REST services. CRLF
> is removed from somefile in second sample
I found Windows to be very picky about single quotes with cURL and also ended up using a file to post data.
Try:
--data _at_{somefile}
That should work.
This email is sent for and on behalf of Aptum Technologies (USA) Inc with US head office located at 101 Marietta Street, Suite 1600, Atlanta, GA 30303. This email and any attachments are confidential and intended for the recipient only. If you have received this message in error, please notify the sender immediately, destroy this email and any attachments, and do not use, copy, store and/or disclose to any person this email and any attachments.
If you no longer wish to receive promotional emails from Aptum Technologies our privacy policy<https://urldefense.com/v3/__https://aptum.com/wp-content/uploads/2019/08/Aptum-Privacy-Policy.pdf__;!!AaIhyw!9csTPG8tcB9TqyExbMJSO5xM21u5wMd7wahQ0XM0ij-YX1mQvoNGk_pFVAvvKOmKAMliLQ$ > outlines how you can request that your details be removed from our mailing systems.
Date: Tue, 29 Mar 2022 14:04:58 +0000
Did you test that?
For me it's not working. _at_ and {} are special character in Powershell. I don’t think you can use them like you proposed.
> I'm trying to use a REST service using Windows mingw/curl. GET works
> nicely on that REST service (HTTP 200), but not POST. If I'm using
> Linux/curl, everything works nicely and I get HTTP 200 for both GET
> and POST. Using Windows mingw/curl, I always get HTTP 302 if using
> POST. Unfortunately, I need to get it working on Windows. I tried
> different variations of using -d parameter as I wrote before, but no
> avail. First sample is adapted from swagger UI for REST services. CRLF
> is removed from somefile in second sample
I found Windows to be very picky about single quotes with cURL and also ended up using a file to post data.
Try:
--data _at_{somefile}
That should work.
This email is sent for and on behalf of Aptum Technologies (USA) Inc with US head office located at 101 Marietta Street, Suite 1600, Atlanta, GA 30303. This email and any attachments are confidential and intended for the recipient only. If you have received this message in error, please notify the sender immediately, destroy this email and any attachments, and do not use, copy, store and/or disclose to any person this email and any attachments.
If you no longer wish to receive promotional emails from Aptum Technologies our privacy policy<https://urldefense.com/v3/__https://aptum.com/wp-content/uploads/2019/08/Aptum-Privacy-Policy.pdf__;!!AaIhyw!9csTPG8tcB9TqyExbMJSO5xM21u5wMd7wahQ0XM0ij-YX1mQvoNGk_pFVAvvKOmKAMliLQ$ > outlines how you can request that your details be removed from our mailing systems.
-- Unsubscribe: https://lists.haxx.se/listinfo/curl-users Etiquette: https://curl.haxx.se/mail/etiquette.htmlReceived on 2022-03-29