1. 13 9月, 2013 1 次提交
  2. 31 8月, 2013 1 次提交
  3. 24 8月, 2013 1 次提交
  4. 09 7月, 2013 1 次提交
  5. 26 6月, 2013 1 次提交
  6. 21 6月, 2013 1 次提交
  7. 04 6月, 2013 1 次提交
    • J
      Introduce `RequestInterceptor` to replace `RequestHeaders`. · 7ddaabb8
      Jake Wharton 提交于
      In addition to global headers (which were doable before), this allows for global
      path param replacement in URLs.
      
      This has cropped up in a few APIs over the internet and we're traditionally not provided
      a good path to implementation. Before you would have to manually move the global param
      around your application to every method call site onto a Retrofit interface. This new
      interface provides a single place to manage these global params along with other
      global headers (such as for authentication).
      
      Given:
      
          @GET("/show/{apiKey}/{showId}/episodes")
          List<Episode> episodes(@Path("showId") String showId)
      
      Usage:
      
          class FooInterceptor implements RequestInterceptor {
            @Inject @ApiKey String apiKey;
      
            @Override public void intercept(RequestFacade request) {
              request.addPathParam("apiKey", apiKey);
            }
          }
      
      This also has the added benefit of saving an extra `List` allocation for global headers
      since they are now set directly on the underlying `Request` via the facade interface.
      7ddaabb8
  8. 24 5月, 2013 1 次提交
  9. 14 5月, 2013 1 次提交
  10. 13 5月, 2013 1 次提交