Package org.apache.commons.httpclient.methods

Examples of org.apache.commons.httpclient.methods.MultipartPostMethod.addParameter()


        post.addParameter("event[description]", RandomUtil.randomText(random, 100, 495));
        post.addParameter("event[telephone]", RandomUtil.randomPhone(random, buffer));
        post.addParameter("event[event_timestamp(1i)]", "2008");
        post.addParameter("event[event_timestamp(2i)]", "10");
        post.addParameter("event[event_timestamp(3i)]", "20");
        post.addParameter("event[event_timestamp(4i)]", "20");
        post.addParameter("event[event_timestamp(5i)]", "10");

        Part imagePart = new FilePart("event_image", eventImg, "image/jpeg", null);
        Part docPart = new FilePart("event_document", eventPdf, "application/pdf", null);
View Full Code Here


        post.addParameter("event[telephone]", RandomUtil.randomPhone(random, buffer));
        post.addParameter("event[event_timestamp(1i)]", "2008");
        post.addParameter("event[event_timestamp(2i)]", "10");
        post.addParameter("event[event_timestamp(3i)]", "20");
        post.addParameter("event[event_timestamp(4i)]", "20");
        post.addParameter("event[event_timestamp(5i)]", "10");

        Part imagePart = new FilePart("event_image", eventImg, "image/jpeg", null);
        Part docPart = new FilePart("event_document", eventPdf, "application/pdf", null);

        post.addPart(imagePart);
View Full Code Here

        Part imagePart = new FilePart("event_image", eventImg, "image/jpeg", null);
        Part docPart = new FilePart("event_document", eventPdf, "application/pdf", null);

        post.addPart(imagePart);
        post.addPart(docPart);
        post.addParameter("tag_list", "tag1");

        addAddress(post);

        // GET the new event form within a user session
        httpClient.executeMethod(eventForm);
View Full Code Here

            throw new IOException("Received empty response");

        // Parse the authenticity_token from the response
        String token = parseAuthToken(responseBuffer);
        if (token != null)
            post.addParameter("authenticity_token", token);

        doMultiPartPost(post, "Event was successfully created.");

        ctx.recordTime();
        ++driverMetrics.addEventTotal;
View Full Code Here

                                                        ctx.getThreadId() + 1;
        String username = UserName.getUserName(id);
        if (username == null || username.length() == 0)
            logger.warning("Username is null!");
                           
        post.addParameter("user[username]", username);
        http.readURL(checkNameURL, "name=" + username);
       
        post.addParameter("user[password]", "" + id);
        post.addParameter("user[password_confirmation]", "" + id);
        post.addParameter("user[firstname]",  RandomUtil.randomName(random, b, 2, 12).toString());
View Full Code Here

            logger.warning("Username is null!");
                           
        post.addParameter("user[username]", username);
        http.readURL(checkNameURL, "name=" + username);
       
        post.addParameter("user[password]", "" + id);
        post.addParameter("user[password_confirmation]", "" + id);
        post.addParameter("user[firstname]",  RandomUtil.randomName(random, b, 2, 12).toString());
        b.setLength(0);
        post.addParameter("user[lastname]",  RandomUtil.randomName(random, b, 5, 12).toString());
        post.addParameter("user[email]", username + "@" + random.makeCString(3, 10) + ".com");
View Full Code Here

                           
        post.addParameter("user[username]", username);
        http.readURL(checkNameURL, "name=" + username);
       
        post.addParameter("user[password]", "" + id);
        post.addParameter("user[password_confirmation]", "" + id);
        post.addParameter("user[firstname]",  RandomUtil.randomName(random, b, 2, 12).toString());
        b.setLength(0);
        post.addParameter("user[lastname]",  RandomUtil.randomName(random, b, 5, 12).toString());
        post.addParameter("user[email]", username + "@" + random.makeCString(3, 10) + ".com");
        b.setLength(0);
View Full Code Here

        post.addParameter("user[username]", username);
        http.readURL(checkNameURL, "name=" + username);
       
        post.addParameter("user[password]", "" + id);
        post.addParameter("user[password_confirmation]", "" + id);
        post.addParameter("user[firstname]",  RandomUtil.randomName(random, b, 2, 12).toString());
        b.setLength(0);
        post.addParameter("user[lastname]",  RandomUtil.randomName(random, b, 5, 12).toString());
        post.addParameter("user[email]", username + "@" + random.makeCString(3, 10) + ".com");
        b.setLength(0);
        post.addParameter("user[telephone]", RandomUtil.randomPhone(random, b).toString());
View Full Code Here

       
        post.addParameter("user[password]", "" + id);
        post.addParameter("user[password_confirmation]", "" + id);
        post.addParameter("user[firstname]",  RandomUtil.randomName(random, b, 2, 12).toString());
        b.setLength(0);
        post.addParameter("user[lastname]",  RandomUtil.randomName(random, b, 5, 12).toString());
        post.addParameter("user[email]", username + "@" + random.makeCString(3, 10) + ".com");
        b.setLength(0);
        post.addParameter("user[telephone]", RandomUtil.randomPhone(random, b).toString());
        post.addParameter("user[summary]", RandomUtil.randomText(random, 50, 200));
        post.addParameter("user[timezone]", RandomUtil.randomTimeZone(random));
View Full Code Here

        post.addParameter("user[password]", "" + id);
        post.addParameter("user[password_confirmation]", "" + id);
        post.addParameter("user[firstname]",  RandomUtil.randomName(random, b, 2, 12).toString());
        b.setLength(0);
        post.addParameter("user[lastname]",  RandomUtil.randomName(random, b, 5, 12).toString());
        post.addParameter("user[email]", username + "@" + random.makeCString(3, 10) + ".com");
        b.setLength(0);
        post.addParameter("user[telephone]", RandomUtil.randomPhone(random, b).toString());
        post.addParameter("user[summary]", RandomUtil.randomText(random, 50, 200));
        post.addParameter("user[timezone]", RandomUtil.randomTimeZone(random));
       
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.