I am new to REST implementation and i am trying to do fileupload using REST
I am trying to use Jersey(But i am okay to any API)
I would like to know some info regarding
1) Creation of client for uploading file (Finding hard time for how i can pass the file/path as a parameter ).
2) Is there anyway i can use secure upload like openSSL(If not any secure way to upload file)
Any hlp is appreciated
Thanks for the reply.
I am using struts2 for file upload through html page (Manual upload). Anyway inside struts2 it uses commonsupload . I am trying to use the same services for automatic uploads from clients. That is the reason i am looking for something like REST style client that will upload file automatically from any client securely.
I am not sure that i can chose REST in this case or i have to look for SOAP based webservices.
I have looked in to HTTPClient from commons that seems to be for the serverside rather than client side automatic secure file upload.
any help is appreaciated
Joined: Oct 04, 2006
Yes, as far as I understand, you can use a RESTful web service and Apache HTTPClient is a HTTP client, for client side applications.
If you want to upload to a RESTful web service, then it should just be a matter of doing a regular HTTP upload to a special URI.
Lets say that you have a RESTful web service allowing you to store and retrieve song files. The URL to a resource may be http://myserver.com/songservice/songs/1234 The resource in this case is a song file. If you, using for instance Apache HTTPClient, POST to that URL and the data is the song file, then a new song resource is created in the service with the uploaded song.
Hope this makes things more clear!