【问题标题】:retrofit custom parameter operator改造自定义参数运算符
【发布时间】:2017-04-13 14:52:05
【问题描述】:

有什么方法可以使用 Retrofit 并将参数 = 运算符符号替换为我自己的运算符(例如 *equals*)。

@GET("/endpoint")
Class method(@Query("Key") int value)

这会创建

/endpoint/method?Key=value

但我需要

/endpoint/method?Key*equals*value

谢谢

【问题讨论】:

    标签: android get retrofit retrofit2


    【解决方案1】:

    您可以尝试解决方法:

    @GET("/endpoint?key*equals*{key_value}")
    Class method(@Path("key_value") int value)
    

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-07-17
    • 1970-01-01
    • 2013-05-17
    • 2012-08-06
    • 1970-01-01
    • 2019-01-04
    • 2015-05-09
    • 2016-01-26
    相关资源
    最近更新 更多