Retrofit2: Http 404 Not Found

I have this simple service on my server at :

router.route('/hooray/')
    .get(function (req, res) {
        res.status(200).send({ result: true, message: "hooray" })
    })

It does work from Postman, but from my Android application I unable to reach that url, and I don't know why.

That's the (simplified) code:

Service's Interface

public interface HoorayAPI {
    @GET("hooray/")
    Observable<HoorayResponse> hooray();
}

My custom Response class: HoorayResponse

public class HoorayResponse{
    @SerializedName("result")
    @Expose
    private boolean result;

    @SerializedName("message")
    @Expose
    private String message;

    public HoorayResponse(boolean result, String message) {
        this.result = result;
        this.message = message;
    }

    // Getter and setter ...
}
David Miller

David Miller

Executive Financial & Market Analyst

David Miller brings 15 years of experience in global economics, personal finance strategy, and market dynamics. He specializes in turning complex economic trends into actionable insights for everyday readers.