Package org.xlightweb

Examples of org.xlightweb.MultipartFormDataRequest$DefaultMultimodeExecutor


        WebContainer server = new WebContainer(new TestServlet());
        server.start();
           
        HttpClient httpClient = new HttpClient();
           
        MultipartFormDataRequest req = new MultipartFormDataRequest("http://localhost:" + server.getLocalPort()+ "/");
       
       

       
        String name = "file40k";
        File file = QAUtil.createTestfile_4k();
        req.addPart(name, file);
        req.addPart("test1", "I wake up early and ...");
        req.addPart("test2", "... saw the light");       
       
        IHttpResponse resp = httpClient.call(req);
       
        FileInputStream fis = new FileInputStream(file);
        Content content = new Content(name, file.getName(), "text/html", fis);
View Full Code Here

TOP

Related Classes of org.xlightweb.MultipartFormDataRequest$DefaultMultimodeExecutor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.