Tabnine Logo
Utils.generateUrl
Code IndexAdd Tabnine to your IDE (free)

How to use
generateUrl
method
in
com.ecwid.consul.Utils

Best Java code snippets using com.ecwid.consul.Utils.generateUrl (Showing top 13 results out of 315)

origin: com.ecwid.consul/consul-api

public static String generateUrl(String baseUrl, UrlParameters... params) {
  return generateUrl(baseUrl, Arrays.asList(params));
}
origin: Ecwid/consul-api

public static String generateUrl(String baseUrl, UrlParameters... params) {
  return generateUrl(baseUrl, Arrays.asList(params));
}
origin: com.ecwid.consul/consul-api

public RawResponse makePutRequest(String endpoint, String content, UrlParameters... urlParams) {
  String url = prepareUrl(agentAddress + endpoint);
  url = Utils.generateUrl(url, urlParams);
  return httpTransport.makePutRequest(url, content);
}
origin: Ecwid/consul-api

public RawResponse makeDeleteRequest(String endpoint, UrlParameters... urlParams) {
  String url = prepareUrl(agentAddress + endpoint);
  url = Utils.generateUrl(url, urlParams);
  return httpTransport.makeDeleteRequest(url);
}
origin: com.ecwid.consul/consul-api

public RawResponse makePutRequest(String endpoint, byte[] content, UrlParameters... urlParams) {
  String url = prepareUrl(agentAddress + endpoint);
  url = Utils.generateUrl(url, urlParams);
  return httpTransport.makePutRequest(url, content);
}
origin: Ecwid/consul-api

public RawResponse makePutRequest(String endpoint, byte[] content, UrlParameters... urlParams) {
  String url = prepareUrl(agentAddress + endpoint);
  url = Utils.generateUrl(url, urlParams);
  return httpTransport.makePutRequest(url, content);
}
origin: Ecwid/consul-api

public RawResponse makeGetRequest(String endpoint, List<UrlParameters> urlParams) {
  String url = prepareUrl(agentAddress + endpoint);
  url = Utils.generateUrl(url, urlParams);
  return httpTransport.makeGetRequest(url);
}
origin: Ecwid/consul-api

public RawResponse makePutRequest(String endpoint, String content, UrlParameters... urlParams) {
  String url = prepareUrl(agentAddress + endpoint);
  url = Utils.generateUrl(url, urlParams);
  return httpTransport.makePutRequest(url, content);
}
origin: com.ecwid.consul/consul-api

public RawResponse makeGetRequest(String endpoint, List<UrlParameters> urlParams) {
  String url = prepareUrl(agentAddress + endpoint);
  url = Utils.generateUrl(url, urlParams);
  return httpTransport.makeGetRequest(url);
}
origin: com.ecwid.consul/consul-api

public RawResponse makeDeleteRequest(String endpoint, UrlParameters... urlParams) {
  String url = prepareUrl(agentAddress + endpoint);
  url = Utils.generateUrl(url, urlParams);
  return httpTransport.makeDeleteRequest(url);
}
origin: Ecwid/consul-api

@Test
public void testGenerateUrl_Simple() throws Exception {
  assertEquals("/some-url", Utils.generateUrl("/some-url"));
  assertEquals("/some-url", Utils.generateUrl("/some-url", (UrlParameters) null));
  assertEquals("/some-url", Utils.generateUrl("/some-url", null, null));
}
origin: Ecwid/consul-api

@Test
public void testGenerateUrl_Parametrized() throws Exception {
  UrlParameters first = new SingleUrlParameters("key", "value");
  UrlParameters second = new SingleUrlParameters("key2");
  assertEquals("/some-url?key=value&key2", Utils.generateUrl("/some-url", first, second));
}
origin: Ecwid/consul-api

@Test
public void testGenerateUrl_Encoded() throws Exception {
  UrlParameters first = new SingleUrlParameters("key", "value value");
  UrlParameters second = new SingleUrlParameters("key2");
  UrlParameters third = new SingleUrlParameters("key3", "value!value");
  assertEquals("/some-url?key=value+value&key2&key3=value%21value", Utils.generateUrl("/some-url", first, second, third));
}
com.ecwid.consulUtilsgenerateUrl

Popular methods of Utils

  • assembleAgentAddress
  • encodeUrl
  • parseUnsignedLong
  • toSecondsString
  • toUnsignedString
  • compareLong
  • encodeValue

Popular in Java

  • Reactive rest calls using spring rest template
  • addToBackStack (FragmentTransaction)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getSupportFragmentManager (FragmentActivity)
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now