I'm very new to this so please be nice. I am trying to make a PUT request to some endpoint in which I need to send that some boolean variable is true or false. I am using okhttp3 with Java 11.
final Request request = new Request.Builder()
.url(someBaseURL + "/" + obj.getKey() + "/path")
.build();
execute(request);
This is my code so far and I need to call the endpoint with the following URL:
"someBaseURL/obj.key/path?booleanVariable=true"
So my question is how do I make a PUT
request that adds this booleanVariable
with its value being true or false. I tried a very stupid and simple way just adding the "?booleanVariable=true"
to the .url()
but then that request is just a GET
and it doesn't work for me.