android - Batch request using Retrofit -
i'd perform batch request using retrofit. there nice way, how accomplish it? i'm trying replace characters in query part of url (replace block allowed in path part of url - using @path
annotation).
here pseudocode problem.
@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);
@query
looking for:
@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);
in version 1.7.0 of retrofit (released yesterday) exception message attempting utilize @path
in original question instructs right solution:
url query string "client_id={client_id}&client_secret={client_secret}&v={v}&ll={ll}&intent={intent}&limit={limit}" must not have replace block. dynamic query parameters utilize @query.
android http url networking retrofit
No comments:
Post a Comment