Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sloy/retrofit-dynamic-endpoint-sample

Quick app to demonstrate dynamic endpoints in retrofit
https://github.com/sloy/retrofit-dynamic-endpoint-sample

Last synced: 9 days ago
JSON representation

Quick app to demonstrate dynamic endpoints in retrofit

Awesome Lists containing this project

README

        

# Retrofit Dynamic Endpoint Sample
I just wanted to quickly test if Retrofit handles a mutable endpoint whose url can be modified. Since it works fine, I'll just share it here too.

### The magic
```java
public class MutableEndpoint implements Endpoint {

private String url;

public void setUrl(String url) {
this.url = url;
}

@Override
public String getUrl() {
return url;
}

@Override
public String getName() {
return url;
}
}
```