I am using Retrofit library in my app, and I’d like to set a timeout of 60 seconds. Does Retrofit have some way to do this?

I set Retrofit this way:

RestAdapter restAdapter = new RestAdapter.Builder()
    .setServer(BuildConfig.BASE_URL)
    .setConverter(new GsonConverter(gson))
    .build();

How can I set the timeout?

10 Answers
10

Leave a Reply

Your email address will not be published. Required fields are marked *