No Retrofit annotation found. (parameter #1)

前端 未结 14 1905
长发绾君心
长发绾君心 2020-12-09 00:50

I want get RSS code from a URL with Retrofit and if I enter url staticly in the get annotation everything is OK but with dynamic url I get an error.

My

14条回答
  •  我在风中等你
    2020-12-09 01:04

    I forgot to add @Field("")

    Previously

       @POST("/api/verify-phone")
        @FormUrlEncoded
        fun sendOTP(phone_number: String): Observable
    

    Fixed

    @POST("/api/verify-phone")
    @FormUrlEncoded
    fun sendOTP(@Field("phone")phone_number: String): Observable
    

提交回复
热议问题