Error onFailurejava.io.EOFException: End of input at line 1 column 1 path $ in a post request
JsonObject createdJson = new JsonObject(); createdJson.addProperty("email", email); createdJson.addProperty("first_name", firstName); createdJson.addProperty("last_name", lastName); createdJson.addProperty("password", newPassword); requestInterface.registerUser(createdJson).enqueue(new Callback<RegistrationResponse>() { @Override public void onResponse(Call<RegistrationResponse> call, Response<RegistrationResponse> response) { Log.d("myLogs", "Responce " + response.headers()); Log.d("myLogs", "Body " + response); } @Override public void onFailure(Call<RegistrationResponse> call, Throwable t) { Log.d("myLogs", "onFailure" + t); } }); Request:
@Headers("Content-Type: application/json") @POST("/signup") Call<RegistrationResponse> registerUser(@Body JsonObject dataToSend);