Send utf8 character with retrofit as query parameter

Viewed 541

How can I send non-ascii characters as a query parameter without encoding it as ascii with retrofit (assuming thats whats happening)?

For example I dont want the value of the query q to go from /?q=Gä to /?q=G%C3%A4 when it arrives at the server end.

@GET("endpoint/")
fun get(
    @Query("q") value: String,
): Response

I have tried using @Query(value = "q", encoded=true) though I dont think that does what I initially thought it would.

I also want to mention that I can send this request in my firefox browser and it works correctly.

0 Answers
Related