wood burning stoves*
The moose likes Web Services and the fly likes File Transfers using ReST Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "File Transfers using ReST" Watch "File Transfers using ReST" New topic
Author

File Transfers using ReST

abhijitg ga
Greenhorn

Joined: Mar 01, 2012
Posts: 9
Hi All,

Not sure whether I am posting in the right forum.

Can we do file transfers using REST APIs? e.g the application is running on node1 exposes some APIs. The client code can run on node2 and call the APIs to fetch a file from Node1.

I researched and found that REST actually is based on underlying http protocol. So I guess it should be possible.

Please comment. Any sample code would definitely help.

J Dirksen
Author
Greenhorn

Joined: Sep 04, 2012
Posts: 13
Yes you can. The basic idea behind rest is that resources are identified by an unique URI and a specific media-type / content-type. Based on this URI you can use the basic HTTP methods to modify or retrieve the resources. If you create a REST api you can create a resouce that provides a list of files with their associated media-type. Your client can then just use HTTP GET to retrieve the file.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: File Transfers using ReST
 
Similar Threads
xml updations and deletions
Using mod_jk
file uploading
<xsl:if> tag problem
newbie Q on Thread Synchronization