Package com.kdubb.retrofitexamples.api

Examples of com.kdubb.retrofitexamples.api.InterestingApi


      .setRequestInterceptor(new ThrottlingInterceptor(1000L))
          .setServer(API_URL)
          .build();
 
    // Create an instance of our InterestingApi interface.
    InterestingApi synchronousApi = restAdapter.create(InterestingApi.class);
   
      // Create an instance of our AsynchronousApi interface.
    AsynchronousApi asyncApi = restAdapter.create(AsynchronousApi.class);
   
    for(int i = 0; i < 10; i++)
      LOG.info("synchronousApi " + synchronousApi.getWithPath(Integer.toString(i)));
   
    for(int i = 0; i < 10; i++)
      asyncApi.getWithPath(Integer.toString(i), new Callback<String>() {

        @Override
View Full Code Here


      .setConverter(converter)
          .setServer(API_URL)
          .build();
 
      // Create an instance of our InterestingApi interface.
    InterestingApi api = restAdapter.create(InterestingApi.class);
   
    // Call each of the methods and output the results
    System.out.println("api.getDate()={" + api.getDate() + "}");
    System.out.println("api.getWithPath()={" + api.getWithPath("my String 1234") + "}");
    System.out.println("api.getWithQuery()={" + api.getWithQuery("my String 1234") + "}");
    System.out.println("api.getWithBody()={" + api.getWithBody("my String 1234") + "}");
    System.out.println("api.getWithDynamicHeader()={" + api.getWithDynamicHeader("max-age=26000") + "}");
    System.out.println("api.getWithFixedHeaders()={" + api.getWithFixedHeaders() + "}");
  }
View Full Code Here

TOP

Related Classes of com.kdubb.retrofitexamples.api.InterestingApi

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.