let's say there is some service

@Path("/printing") public class PService { @POST @Path("/check") @Produces(MediaType.TEXT_PLAIN) public String test(@QueryParam("t") String txt) { return "Вы отправили: " + txt; } } 

when I knock on the URL with the browser or Postman 127.0.0.1:8080/project/printing/check?t=qweqweqwe I honestly get an answer. but with Okhttp I don’t understand how I’ll get through ... or rather, the returne returns only either null or I took nothing as a source from here

  • I thought I found a solution, but it turns out that there is no ... the question is open - Muzaffar Rasulov

1 answer 1

You can use HttpUrl.Builder.addQueryParameter to build a URL.