I have this request and I need to send it by FormUrlEncoded using Retrofit
{
"clnt_id": "OQW",
"clnt_res": "AA!@#$T",
"type": "SCDS",
"len": "ASD"
}
I used this code:
@FormUrlEncoded
@POST("Endpoint")
@Headers("Accept: Application/JSON")
fun connect(
@Field("clnt_id") clnt_id: String,
@Field(value = "clnt_res", encoded = false) clnt_res: String,
@Field("type") type: String,
@Field("len") len: String
): Observable<Token>
First, thing is that the request is not sent as JSON
Second, the value of "clnt_res", encoded by retrofit