我的问题是在发送到服务器之前对查询参数进行编码。我正在使用Retrofit2 API服务客户端。
我的请求:@GET("/Categories/70/{category}")
fun getPLPList(@Path("category") category: String, @QueryMap(encoded = true) map: Map<String, String>): Observable<PLPModel>
我已经启用flag encoded=truitut
,但对我来说无效。
Api请求:https://api-test.net/Categories/CL/70/cat450012?orderBy=5
预期输出:https://api-test.azurewebsites.net/Categories/CL/70/cat450012?orderBy%3D5