Backfit URL Encounter

Asked

Viewed 61 times

0

How do I get my url that contains a "+" to be sent by retrofit with "Encode" but currently the result url is:

http://api.xxxx.com.br/aluno?campo=220+2d+

And hence my backend entede this + as a space, which generates me several problems.

The url result I want is this:

    http://api.xxxx.com.br/aluno?campo=220%2B2d%2B

What I tried now was to add:

    Call<JsonElement> updatealuno(@QueryMap(encoded = true) Map<String, String> campospraupdate);
  • 2

    Utilize URLEncoder when adding the value in campospraupdate

  • It worked, thank you

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.