How do I integrate ruby on rails app with postful using POST and XML?
- by Angela
Hi, this is a pretty basic question but I'm not entirely clear how to do this.
I am trying to use a third-party service that has RESTful service. The service is called Postful. But I'm not clear what exactly to do?
http://www.postful.com/service/mail is one of the services, but to upload an image I have to post the following (but I'm not sure how I actually do this?). Thanks!
> http://www.postful.com/service/upload
>
> Be sure to include the Content-Type
> and Content-Length headers and the
> image itself as the body of the
> request.
>
> POST /upload HTTP/1.0 Content-Type:
> application/octet-stream
> Content-Length: 301456
>
> ... file content here ...
>
> If the upload is successful, you will
> receive a response like the following:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <upload>
> <id>290797321.waltershandy.2</id>
> </upload>