retrofit 2 @path Vs @query

后端 未结 6 408
暖寄归人
暖寄归人 2021-01-29 23:25

I am new to retrofit 2 library.I read several articles to get started as a beginner and I managed to fetch XML data from my RESTful API without specifying parameters.In my metho

6条回答
  •  -上瘾入骨i
    2021-01-30 00:01

    Query is use for URL parameters and with @Query("password") the URL should be :

    user/john?password=****
    

    Path is use to replace item defined in your path, like

    user/{username}
    

提交回复
热议问题