这是一个非常基本的问题,但我不完全清楚如何做到这一点。如何将POST/GET从导轨添加到带有Nestful的API?
我正在尝试使用具有基于Web的服务的第三方服务。该服务称为Postful。但我不清楚究竟该做什么?
我看过ActiveResource(http://api.rubyonrails.org/classes/ActiveResource/Base.html)和rest-client,但我仍然不清楚要创建的步骤,代码和文件。
我想使用Nestful,但我不完全清楚如何使这项工作。 http://github.com/maccman/nestful
http://www.postful.com/service/mail是服务之一(详细信息发现http://www.postful.com/developer/guide#rest),而是要上传图片我要上传以下(但我不知道我是如何真正做到这一点?)。谢谢!
> 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>
你已经能够确定他们是否有上传文件RESTful接口? – nfm 2010-05-17 22:56:01
我不这么认为 - 唯一的接口是上面描述的那个.... :( – Angela 2010-05-17 23:12:00