這是一個非常基本的問題,但我不完全清楚如何做到這一點。如何將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