gpt4 book ai didi

android - Retrofit 2 错误 URL 查询字符串 must not have replace block

转载 作者:行者123 更新时间:2023-11-29 02:39:53 29 4
gpt4 key购买 nike

我正在尝试使用 Retrofit 2 调用遗留 API,这是 URL "/api/0.3/v3/?endpoint=/admin/customers/6728382/addresses.json" 和这个是接口(interface)方法

@GET("/api/0.3/v3/?endpoint=/admin/customers/{customerId}/addresses.json")
Single<GetCustomerAddressesResponse> getUserAddresses(@Path("customerId") String customerId);

但是我得到这个错误,

"URL query string "endpoint=//admin/customers/{customerId}/addresses.json" must not have replace block. For dynamic query parameters use @Query."

我该如何解决这个问题?

最佳答案

我认为 id 必须是 int 类型。尝试将 String 更改为 int

关于android - Retrofit 2 错误 URL 查询字符串 must not have replace block,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44984334/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com