Package org.apache.http.client.utils

Examples of org.apache.http.client.utils.URIBuilder.addParameter()


            if (param.getValue() instanceof Iterable) {
                for (String single : (Iterable<String>) param.getValue()) {
                    apiUrlBuilder.addParameter(param.getKey() + "[]", single);
                }
            } else {
                apiUrlBuilder.addParameter(param.getKey(), Cloudinary.asString(param.getValue()));
           
        }
        DefaultHttpClient client = new DefaultHttpClient(connectionManager);
        URI apiUri = apiUrlBuilder.build();
        HttpUriRequest request = null;
View Full Code Here


        URIBuilder ub = new URIBuilder(uri);
        ub.setPath(ub.getPath() + path);

        if (params != null) {
            for (Map.Entry<String, String> ent : params.entrySet())
                ub.addParameter(ent.getKey(), ent.getValue());
        }

        return ub.build();
    }
View Full Code Here

    params.put("type", options.get("type"));
    params.put("timestamp", new Long(System.currentTimeMillis() / 1000L).toString());
    signRequest(params, options);
    URIBuilder builder = new URIBuilder(cloudinaryApiUrl("download", options));
    for (Map.Entry<String, Object> param : params.entrySet()) {
      builder.addParameter(param.getKey(), param.getValue().toString());
    }
    return builder.toString();
  }

  public String zipDownload(String tag, Map<String, Object> options) throws URISyntaxException {
View Full Code Here

    }
    params.put("transformation", transformation);
    signRequest(params, options);
    URIBuilder builder = new URIBuilder(cloudinaryApiUrl("download_tag.zip", options));
    for (Map.Entry<String, Object> param : params.entrySet()) {
      builder.addParameter(param.getKey(), param.getValue().toString());
    }
    return builder.toString();
  }

  protected void initFromUrl(String cloudinaryUrl) {
View Full Code Here

        }
        URIBuilder apiUrlBuilder = new URIBuilder(apiUrl);
        for (Map.Entry<String, ? extends Object> param : params.entrySet()) {
            if (param.getValue() instanceof Iterable) {
                for (String single : (Iterable<String>) param.getValue()) {
                    apiUrlBuilder.addParameter(param.getKey() + "[]", single);
                }
            } else {
                apiUrlBuilder.addParameter(param.getKey(), Cloudinary.asString(param.getValue()));
           
        }
View Full Code Here

            if (param.getValue() instanceof Iterable) {
                for (String single : (Iterable<String>) param.getValue()) {
                    apiUrlBuilder.addParameter(param.getKey() + "[]", single);
                }
            } else {
                apiUrlBuilder.addParameter(param.getKey(), Cloudinary.asString(param.getValue()));
           
        }
        DefaultHttpClient client = new DefaultHttpClient(connectionManager);
        URI apiUri = apiUrlBuilder.build();
        HttpUriRequest request = null;
View Full Code Here

            List<Thread> threads = new ArrayList<>();

            Holder h1 = new Holder();
            URIBuilder builder = new URIBuilder(root + "/ctx");
            builder.addParameter("eg", "EG1");
            builder.addParameter("c", "1");
            builder.addParameter("p", "1");
            builder.addParameter("xg", String.valueOf(xg));
            threads.add(execute(client, new HttpPost(builder.build()), h1));
View Full Code Here

            List<Thread> threads = new ArrayList<>();

            Holder h1 = new Holder();
            URIBuilder builder = new URIBuilder(root + "/ctx");
            builder.addParameter("eg", "EG1");
            builder.addParameter("c", "1");
            builder.addParameter("p", "1");
            builder.addParameter("xg", String.valueOf(xg));
            threads.add(execute(client, new HttpPost(builder.build()), h1));

            Holder h2 = new Holder();
View Full Code Here

            Holder h1 = new Holder();
            URIBuilder builder = new URIBuilder(root + "/ctx");
            builder.addParameter("eg", "EG1");
            builder.addParameter("c", "1");
            builder.addParameter("p", "1");
            builder.addParameter("xg", String.valueOf(xg));
            threads.add(execute(client, new HttpPost(builder.build()), h1));

            Holder h2 = new Holder();
            builder = new URIBuilder(root + "/ctx");
View Full Code Here

            Holder h1 = new Holder();
            URIBuilder builder = new URIBuilder(root + "/ctx");
            builder.addParameter("eg", "EG1");
            builder.addParameter("c", "1");
            builder.addParameter("p", "1");
            builder.addParameter("xg", String.valueOf(xg));
            threads.add(execute(client, new HttpPost(builder.build()), h1));

            Holder h2 = new Holder();
            builder = new URIBuilder(root + "/ctx");
            builder.addParameter("eg", "EG2");
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.