Add query params to a GET request in okhttp in Android

后端 未结 4 831
星月不相逢
星月不相逢 2021-01-12 00:56

Is there a way to add query params (?param1=val1¶m2=val2) to a GET request using okhttp in Android?

I am looking for an API and no

4条回答
  •  萌比男神i
    2021-01-12 01:20

    This is not possible with the current version of okhttp, there is no method provided that will handle this for you.

    However, Jesse Wilson, one of okhttp's developers, has stated that

    We're adding a new HttpUrl class that can do this in the next release.

提交回复
热议问题