Even after i am passing an entity in the Request , I am not able to get it in
handleGet() method.
The same logic works for handlePut() and handlePost(). I am able to retrieve the
entities in handlePost() and handlePut().
What is different for handleGet()? Why am I not able to retrieve the
Sending a file:
Client Code:
FileRepresentation rep = new FileRepresentation(C:\\input.txt,
MediaType.MULTIPART_FORM_DATA, 0);
Request request = new Request(Method.PUT,rep);
Response resp = new Client(Protocol.HTTP).handle(request);
My question is how to read the
Please help me regarding sending a file as an attachment using Restlet.
I have
written my client code. Please let me know if it's correct.
Client:
FileRepresentation rep = new
FileRepresentation(c:\\input.text,MediaType.TEXT_ALL, 0);
Client client = new Client(Protocol.HTTP);
Response response
Surjendu,
By default, Restlet does not handle the multi-part form request, so you
will need to use some form of multi-part form handling library to do
this. The file upload library that is most commonly used, and the one
used by RestletFileUpload, is the Apache commons-fileupload library.
Make
4 matches
Mail list logo