I have a format api localhost / api /? Auth.method = {"username": "value1", "password": "value2"}

How can I set values ​​via retrofit?
Tried to set the function function (@Path ("value1") String username, @Path ("value2") String password);
But returns error: must not have replace block. For dynamic query parameters use @Query.

  • You need to use the pass parameter (if you have a GET request) @Query("auth.method") and pass a class object serialized to JSON with string username and password fields. - Yuriy SPb pm

0