Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/http/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 使用改造的批处理请求_Android_Http_Url_Networking_Retrofit - Fatal编程技术网

Android 使用改造的批处理请求

Android 使用改造的批处理请求,android,http,url,networking,retrofit,Android,Http,Url,Networking,Retrofit,我想使用改型执行批处理请求。有没有什么好办法,如何实现呢?基本上,我试图做的是替换URL的查询部分中的一些字符(替换块只允许在URL的路径部分使用@path注释) 这是我的问题的伪代码 @GET("/v2/multi?requests=/users/self,/venues/search?client_id={client_id}&client_secret={client_secret}&v={v}&ll={ll}&intent={intent}&lim

我想使用改型执行批处理请求。有没有什么好办法,如何实现呢?基本上,我试图做的是替换URL的查询部分中的一些字符(替换块只允许在URL的路径部分使用
@path
注释)

这是我的问题的伪代码

@GET("/v2/multi?requests=/users/self,/venues/search?client_id={client_id}&client_secret={client_secret}&v={v}&ll={ll}&intent={intent}&limit={limit}")
    ProfileSearchVenuesResponse searchVenuesAndProfiles(@ReplaceBy("client_id") String clientId,
                          @ReplaceBy("client_secret") String clientSecret,
                          @ReplaceBy("v") int version,
                          @ReplaceBy("ll") String location,
                          @ReplaceBy("intent") String intent,
                          @ReplaceBy("limit") int limit);
这是您正在寻找的:

@GET("/v2/multi?requests=/users/self,/venues/search")
ProfileSearchVenuesResponse searchVenuesAndProfiles(
    @Query("client_id") String clientId,
    @Query("client_secret") String clientSecret,
    @Query("v") int version,
    @Query("ll") String location,
    @Query("intent") String intent,
    @Query("limit") int limit);
在1.7.0版的改型(昨天发布)中,原始问题中尝试使用
@Path
的异常消息指示您正确的解决方案:

URL查询字符串“client_id={client_id}&client_secret={client_secret}&v={v}&ll={ll}&intent={intent}&limit={limit}”不能有替换块。对于动态查询参数,请使用@query


谢谢我使用的是1.6.0,所以我没有得到可以使用
@Query
进行查询的信息。