yongjhih / NotRetrofit

Type-safe REST client for Android and Java
Apache License 2.0
93 stars 12 forks source link

Builder pattern .baseUrl doesn't override the @Retrofit("http:baseurl") #11

Open kenkyee opened 8 years ago

kenkyee commented 8 years ago

The code generated for the method call is

    if (!_url.startsWith("http://") && !_url.startsWith("https://")) {
        _url = "Nothing" + _url;
    }

If you use @Retrofit("Nothing") and you create a builder w/ .baseUrl("http://somehost")

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/30308771-builder-pattern-baseurl-doesn-t-override-the-retrofit-http-baseurl?utm_campaign=plugin&utm_content=tracker%2F8327951&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F8327951&utm_medium=issues&utm_source=github).
kenkyee commented 8 years ago

hmmm...I looked at the retrofit.vm source code and the generated code...doesn't look like the builder pattern works at all...should probably just remove it from the docs but we do need a way to change options at runtime like the baseURL to switch from debug to production versions of the endpoint via a switch :-P

Should probably collapse bug 10 and 11 into one...