Issue in Curl to send http POST request with attachment/multipart


Login or Register to Reply

 
Thread Tools Search this Thread
# 1  
Old 05-19-2010
Issue in Curl to send http POST request with attachment/multipart

Hi,

I am using curl to hit a url using http in solaris 10 using commandline, I want to transfer an attachment(using multipart curl -F) also as a part of the request. If anyone has used kindly help me with the syntax. I am using below command:


Code:


/usr/local/bin/curl -v http://153.88.xxx.xx:80/AttachmentHa...Processor.aspx -A "Jakarta Commons-HttpClient/3.0" --header "Accept: text/xml" -H "Content-Type: multipart/related; type=text/xml" -f "file=mm.xml"
When I use below, I get succesful result but with above command I get "Root element is missing", as I need to send multipart content(i.e. an attachment as well) so I want to use -F option, also let me know how to send attachment also.


Code:
/usr/local/bin/curl -v http://153.88.xxx.xx:80/AttachmentHa...Processor.aspx -A "Jakarta Commons-HttpClient/3.0"
--header "Accept: text/xml" -H "Content-Type: multipart/related; type=text/xml" -d "@mm.xml"
# 2  
Old 05-19-2010
Double post, continued here, thread closed.
Login or Register to Reply

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
Curl - post form issue Fred13 Web Development 3 2 Weeks Ago 06:11 AM
Error on executing soap request using Curl command siramitsharma Web Development 2 09-29-2015 01:25 PM
Construct and Send Multipart MIME Mail kirankumar Shell Programming and Scripting 2 07-16-2014 02:16 AM
Curl Script - Post a file (multipart/form-data) Anooja G Shell Programming and Scripting 0 04-28-2014 09:08 AM
Parsing the http post request jdp Shell Programming and Scripting 2 08-07-2013 01:27 AM
http request jurgen Shell Programming and Scripting 2 10-11-2012 05:48 AM
C++ http GET request using sockets flagman5 Programming 2 05-23-2012 11:22 AM
Syntax issue in curl for getting a file from http site prabirkumardhar UNIX for Advanced & Expert Users 1 05-18-2012 11:54 AM
cant make a http get request using wget elthox UNIX for Dummies Questions & Answers 1 02-20-2009 02:49 PM
How to send XML data using HTTP Post Request sandeep reddy Shell Programming and Scripting 0 10-13-2008 09:08 AM
How to send a Head Http request from command line darkling235 UNIX for Dummies Questions & Answers 3 04-04-2008 03:48 AM
HTTP request noufal UNIX for Dummies Questions & Answers 3 01-31-2008 04:55 AM
http request forward piltrafa UNIX for Dummies Questions & Answers 4 12-06-2007 12:40 PM
Http request in Linux malaysoul Shell Programming and Scripting 7 01-26-2007 11:25 AM
unix script http request arksal UNIX for Dummies Questions & Answers 1 08-24-2006 11:15 PM