Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force trailing slash on base URL #1049

Closed
JakeWharton opened this issue Sep 2, 2015 · 3 comments
Closed

Force trailing slash on base URL #1049

JakeWharton opened this issue Sep 2, 2015 · 3 comments

Comments

@JakeWharton
Copy link
Member

You never want http://example.com/foo but rather http://example.com/foo/ to ensure the relative URL is resolved as a child rather than as a sibling of that path.

@JakeWharton
Copy link
Member Author

Add a trailing slash on the base url, remove leading slash on annotation.

On Fri, Sep 4, 2015 at 10:51 AM Joe Petrakovich notifications@github.com
wrote:

For some reason my base URL trailing paths are truncated, is this related?

For example, with base URL "https://www.hello.com/api/v1"
and Retrofit call @get https://github.com/GET("/user")

The onResponse is showing an error with the URL as "
https://www.hello.com/user"


Reply to this email directly or view it on GitHub
#1049 (comment).

@joepetrakovich
Copy link

I actually had deleted my comment before your response because I found your answer on StackOverflow and doubly after watching the video of your talk! Thanks again, Jake.

@JakeWharton
Copy link
Member Author

Ah, ok. Great. I'm triaging a ton of email and not looking on the website.
Documentation around this is coming!

On Sat, Sep 5, 2015 at 12:22 AM Jake Wharton jakewharton@gmail.com wrote:

Add a trailing slash on the base url, remove leading slash on annotation.

On Fri, Sep 4, 2015 at 10:51 AM Joe Petrakovich notifications@github.com
wrote:

For some reason my base URL trailing paths are truncated, is this related?

For example, with base URL "https://www.hello.com/api/v1"
and Retrofit call @get https://github.com/GET("/user")

The onResponse is showing an error with the URL as "
https://www.hello.com/user"


Reply to this email directly or view it on GitHub
#1049 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants