Skip to content

Instantly share code, notes, and snippets.

@fatorx
Created October 15, 2015 18:17
Show Gist options
  • Save fatorx/7884ef1b7f5d92d365a2 to your computer and use it in GitHub Desktop.
Save fatorx/7884ef1b7f5d92d365a2 to your computer and use it in GitHub Desktop.

Revisions

  1. fatorx created this gist Oct 15, 2015.
    13 changes: 13 additions & 0 deletions Retrofit.java
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    RequestInterceptor requestInterceptor = new RequestInterceptor() {
    @Override
    public void intercept(RequestFacade request) {
    request.addHeader("Content-Type", "application/json");
    //request.addHeader("Authorization", tokenApp);
    }
    };

    RestAdapter restAdapter = new RestAdapter.Builder()
    .setEndpoint(Configs.getAddressApi())
    .setRequestInterceptor(requestInterceptor)
    .setLogLevel(RestAdapter.LogLevel.FULL)
    .build();