Today (Saturday) We will make some minor tuning adjustments to MySQL.

You may experience 2 up to 10 seconds "glitch time" when we restart MySQL. We expect to make these adjustments around 1AM Eastern Daylight Saving Time (EDT) US.


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


Login or Register to Reply

 
Thread Tools Search this Thread
# 1  
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  
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 Script - Post a file (multipart/form-data)
Anooja G
Hi All, I am trying to post an xml file (utf-16 encoded) using curl to a REST service. The REST service is expecting 'multipart/form-data' content type. curl -k -i -H "Content-Type=multipart/form-data" -F "filename=@file.xml;type=text/xml" -X POST -u <username>:<password> <endPointURL> ...... Shell Programming and Scripting
0
Shell Programming and Scripting
Parsing the http post request
jdp
Hi, I am trying to write a shell script to parse the post request data that it received to a xml file. Below is the post request data that script is receiving. -----------------------------7dd2339190c8e Content-Disposition: form-data; name="param1" 1...... Shell Programming and Scripting
2
Shell Programming and Scripting
Syntax issue in curl for getting a file from http site
prabirkumardhar
Hi All I am using curl in my client environment. We need to pull a file from the libraries site. All the files are having perticular URL which can be used to get the files. Only issue is, when we fire that command , it will take to authentication page 1st. once authentication is succed, it will...... UNIX for Advanced & Expert Users
1
UNIX for Advanced & Expert Users
How to send XML data using HTTP Post Request
sandeep reddy
How to hit HTTP Post Request along with sending XML data to a Remote server through command line utility like wget (or anything else).... Shell Programming and Scripting
0
Shell Programming and Scripting
How to send a Head Http request from command line
darkling235
Ok. I'm testing a new program component that is supposed to speed up our pipeline on the server. What it does is take in HEAD requests and shuffle them off to a different pipeline that is specially designed to handle HEAD requests quickly. The functionality works but now comes the question: how...... UNIX for Dummies Questions & Answers
3
UNIX for Dummies Questions & Answers

Featured Tech Videos