Skip to content

Instantly share code, notes, and snippets.

@rhari991
Created February 6, 2018 15:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rhari991/03adf3109571931febab53de5c1122a7 to your computer and use it in GitHub Desktop.
Save rhari991/03adf3109571931febab53de5c1122a7 to your computer and use it in GitHub Desktop.
A sample way to define a Retrofit interface for multiple required and optional request arguments
public interface MyApiService {
public Call<String> method(String requiredArgument1);
public Call<String> method(String requiredArgument1, String optionalArgument1);
public Call<String> method(String requiredArgument1, String optionalArgument1, String optionalArgument2);
//Add every possible combination of arguments
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment