Answer the question
In order to leave comments, you need to log in
How to know if HttpClient is sending request or not?
private void registerToken(String token) {
OkHttpClient client = new OkHttpClient();
RequestBody body = new FormBody.Builder()
.add("token",token)
.build();
Request request = new Request.Builder()
.url("http://site.ru/site/devices/")
.post(body)
.build();
try {
client.newCall(request).execute();
} catch (IOException e) {
e.printStackTrace();
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question