Skip to main content
added 2 characters in body
Source Link
thegio
  • 1.2k
  • 8
  • 28

I'm trying to post an XML to a REST API via CURL but is not working:

  λ curl -X POST  -H "Content-Type: application/xml" http://localhost/vcardservice -d '<?xml version='1.0' encoding='ISO-8859-1' standalone='yes'?><ns2:vCardRequestStore>
    <vcardRequestList> <vcardRequest></vcardRequest></vcardRequestList></ns2:vCardRequestStore>'
 

but is not working

Error:
    < was unexpected at this time.

Any help is appreciated.

I'm trying to post an XML to a REST API via CURL but is not working

  λ curl -X POST  -H "Content-Type: application/xml" http://localhost/vcardservice -d '<?xml version='1.0' encoding='ISO-8859-1' standalone='yes'?><ns2:vCardRequestStore>
<vcardRequestList> <vcardRequest></vcardRequest></vcardRequestList></ns2:vCardRequestStore>'
 
Error:
    < was unexpected at this time.

Any help is appreciated.

I'm trying to post an XML to a REST API via CURL:

λ curl -X POST  -H "Content-Type: application/xml" http://localhost/vcardservice -d '<?xml version='1.0' encoding='ISO-8859-1' standalone='yes'?><ns2:vCardRequestStore>
    <vcardRequestList> <vcardRequest></vcardRequest></vcardRequestList></ns2:vCardRequestStore>'

but is not working

Error:
    < was unexpected at this time.

Any help is appreciated.

edited title
Link
thegio
  • 1.2k
  • 8
  • 28

CURL: POST XML data to server [cmdline][cmdline WINDOWS]

Source Link
thegio
  • 1.2k
  • 8
  • 28

CURL: POST XML data to server [cmdline]

I'm trying to post an XML to a REST API via CURL but is not working

  λ curl -X POST  -H "Content-Type: application/xml" http://localhost/vcardservice -d '<?xml version='1.0' encoding='ISO-8859-1' standalone='yes'?><ns2:vCardRequestStore>
<vcardRequestList> <vcardRequest></vcardRequest></vcardRequestList></ns2:vCardRequestStore>'

Error:
    < was unexpected at this time.

Any help is appreciated.