There is a code for sending a Post request with the phone and lang fields in the request body. Without FormUrlEncoded this business does not work. What does this abstract mean and why is it needed? I tried to shove the request body differently, but it didn't work out.

public interface SmsApi { @FormUrlEncoded @POST("phone_add/{id}") Call<PhoneAddModel> phoneAdd(@Path("id") String id, @Field("phone") String phone, @Field("lang") String lang); } 

    1 answer 1

    And you did not try to look at her description ? This annotation defines the field transfer format of the same name in the body of the POST request. Roughly speaking, it records these fields in the request body in the same format as they would be written in the URL string for a GET request.

    • Roughly speaking, is it something like @Query for a GET request? - Roman Kavyrshin
    • You can probably say so - xkor