File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » Web Services
Bookmark "File Transfers using ReST" Watch "File Transfers using ReST" New topic

File Transfers using ReST

abhijitg ga

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

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:
subject: File Transfers using ReST
jQuery in Action, 3rd edition