I am trying to post an xml file to the dealmapenter link description here api using an xml file I built with builder in rails (though this should apply to any xml POST request).
The XML file I am trying to send can be found here:
http://www.frugle.me/frugles/25-10-off-purchase/dealmap.xml
and the address I am trying to post to here:
http://api.thedealmap.com/deals/?key=0-2304664-634434226955110000
I am attempting to do it with curl using either/both:
curl -X POST -d -v http://www.frugle.me/frugles/25-10-off-purchase/dealmap.xml http://api.thedealmap.com/deals/?key=0-2304664-634434226955110000
or
curl -d -v http://www.frugle.me/frugles/25-10-off-purchase/dealmap.xml http://api.thedealmap.com/deals/?key=0-2304664-634434226955110000
but sometimes I get a 404 error on my end, and other times I get a 500 error on dealmaps end like so:
* About to connect() to api.thdealmap.com port 80 (#0)
* Trying 173.227.66.251... connected
* Connected to api.thdealmap.com (173.227.66.251) port 80 (#0)
> POST /deals/?key=0-2304664-634434226955110000 HTTP/1.1
> User-Agent: curl/7.19.7 (universal-apple-darwin10.0) libcurl/7.19.7 OpenSSL/0.9.8l zlib/1.2.3
> Host: api.thdealmap.com
> Accept: */*
> Content-Length: 65
> Content-Type: application/x-www-form-urlencoded
< HTTP/1.1 500 Internal Server Error
< Connection: close
< Date: Sun, 12 Jun 2011 05:04:42 GMT
< Server: Microsoft-IIS/6.0
< Content-Language: en-US
< Content-Type: text/html
<
* Closing connection #0
Am I going about this all wrong? Is there a standard way to be doing this? I am having trouble finding any information in general on the internet about such actions, though it seems like they would be commonplace.
Any help you could give would be much appreciated!