Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Passing multiple XML objects using curl

 
Rajesh Khan
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The following cul command works
curl -X PUT -HContent-type:application/xml --data "<User><ip_address>foo</ip_address></User>" http://localhost:8080/Rest/rest/sub/Whatever
but when passing two objects like such

curl -X PUT -HContent-type:application/xml --data " "<User><ip_address>foo</ip_address></User>" "<Field><page_uri>something</page_uri></Field>"" http://localhost:8080/EdaRest/rest/sub/Whatever
fails ? one object is User and other is Field
 
Sp Wong
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please try below:



If you have too long XML request data to send over, you can place the XML into a file...and the execute your command like below:

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic