Hi Billy, I'd like to mention that usage of the multipart form (often called "file upload") content type is not necessary in your scenario. It is only useful when you post from a browser client.
In other cases, where the client is a programmatic client, you can simply POST a representation directly and retrieve it without even using the RestletFileUpload facility. Best regards, Jerome > -----Message d'origine----- > De : news [mailto:[EMAIL PROTECTED] De la part de billy > Envoyé : jeudi 5 juillet 2007 13:01 > À : [email protected] > Objet : How to send files using Restlet > > Hi, > > I'm trying to upload files using Restlet as client and > server. For the server, > I am using RestletFileUpload and it works. > > However, for the client, I have no clue how to put files. All > I have achieved > so far is: > > Request request = new Request > (Method.GET, "http://localhost:8182/"); > Client client = new Client(Protocol.HTTP); > client.handle(request); > Response resp = client.handle(request); > > The client can reach the server, but of course with an error: > > the request doesn't contain a multipart/form-data or > multipart/mixed stream, > content type header is null > > How can I set it so that the client can point to to some file > and post it to > the server? Also, is compression supported and how to do it? > I have found some > decode method. But is it for text encoding, e.g., to UTF-8, > and not for > compression? > > Thanks, billy

