android retrofit get request @Path error

I'm stuck with weird problem with GET request in android when I implemented request with retrofit.

I implemented this get request method and it worked alright.

this get request work perfectly

this get request work perfectly

then I decided that I need to dynamically change it in activity when i want it.

get request in interface

and when I pass to this method same exact URL this is how it looks in activity

this is how it looks in activity

In return I receive only error, that looks like this.

Response{protocol=http/1.1, code=404, message=Not Found, url=

I can't really figure out where to look for the problem.



answered 6 months ago Павел Якунин #1

Just found out what's the problem. You can't pass url with slash (/) to get method, @Path receive it only like this. enter image description here

comments powered by Disqus