How do I integrate ruby on rails app with postful using POST and XML?

Posted by Angela on Stack Overflow See other posts from Stack Overflow or by Angela
Published on 2010-05-09T01:15:35Z Indexed on 2010/05/09 1:18 UTC
Read the original article Hit count: 259

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>

© Stack Overflow or respective owner

Related posts about postful

Related posts about restful-web-services