I am doing android, looking for a way to do a super basic http GET/POST request. I keep getting an error:
java.lang.IllegalArgumentException: Unable to creat
call.enqueue(new Callback() { @Override public void onResponse(@NonNull Call call, @NonNull Response response) { if (response.isSuccessful()) { Gson gson = new Gson(); String successResponse = gson.toJson(response.body()); Log.d(LOG_TAG, "successResponse: " + successResponse); } else { try { if (null != response.errorBody()) { String errorResponse = response.errorBody().string(); Log.d(LOG_TAG, "errorResponse: " + errorResponse); } } catch (Exception e) { e.printStackTrace(); } } } @Override public void onFailure(@NonNull Call call, @NonNull Throwable t) { } });