Answer the question
In order to leave comments, you need to log in
Why does the 414 error keep appearing?
Hello. I use Retrofit to send a picture and some data from an Android app to a server. (Server in Java. Tomcat). But it keeps returning error 414.
interface Api {
@POST("addevent")
Call<Answer> addEvent(@Query("type") String type, @Query("photo") String photo,
@Query("worker_id") int workerId, @Query("company_id") int companyId, @Query("timestamp") long timestamp);
}
// Потом
retrofit = new Retrofit.Builder()
.baseUrl(getString(R.string.IP) + getString(R.string.PORT) + "/")
.addConverterFactory(GsonConverterFactory.create())
.build();
api = retrofit.create(Api.class);
Call<Answer> checkPinCode = api.addEvent(type, photo, workerId, companyId, timestamp);
checkPinCode.enqueue(new Callback<Answer>() {
// ...
}
http {
large_client_header_buffers 4 16384k;
client_max_body_size 20m;
}
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