How to send a getForObject request with parameters Spring MVC

后端 未结 2 777
臣服心动
臣服心动 2021-02-19 06:47

I have a method on the Server side which gives me information about an specific name registered in my database. I\'m accessing it from my Android application.

The reque

2条回答
  •  轮回少年
    2021-02-19 07:38

    Change

    String url = BASE_URL + "/android/played.json";
    

    to

    String url = BASE_URL + "/android/played.json?name={name}";
    

    because the map contains variables for the url only!

提交回复
热议问题