I am using retrofit to parse the json response. But I am getting failure response.
Here is the retrofitCallBack method which I am using but I am getting onFailure Response.
private void retrofitCallBack() {
        OkHttpClient okHttpClient = new OkHttpClient.Builder()
                .connectTimeout(1, TimeUnit.MINUTES)
                .readTimeout(30, TimeUnit.SECONDS)
                .writeTimeout(15, TimeUnit.SECONDS)
                .build();
        Retrofit retrofit = new Retrofit.Builder()
                .baseUrl(SpinnerInterfaces.JSONURL)
                .addConverterFactory(ScalarsConverterFactory.create())
                .client(okHttpClient)
                .build();
        SpinnerInterfaces api = retrofit.create(SpinnerInterfaces.class);
        Call<String> call = api.getJSONString();
        final ProgressDialog progressDialog;
        progressDialog = new ProgressDialog(SpinnerActivity.this);
        progressDialog.setMessage(getString(R.string.loading_message));
        progressDialog.setMax(100);
        progressDialog.show();
        call.enqueue(new Callback<String>() {
            @Override
            public void onResponse(@NonNull Call<String> call, @NonNull Response<String> response) {
                Log.e("response","response"+response.body());
                Log.e("response","response"+response.toString());
                progressDialog.dismiss();
                if (response.isSuccessful()) {
                    if (response.body() != null) {
                        String jsonresponse = response.body();
                        spinJSON(jsonresponse);
                    } else {
                        Toast.makeText(SpinnerActivity.this, getString(R.string.response_unsuccessful), Toast.LENGTH_LONG).show();
                    }
                }
            }
            @Override
            public void onFailure(Call<String> call, Throwable t) {
                Log.e("response","response"+t);
                Log.e("response","response"+call);
                progressDialog.dismiss();
                Toast.makeText(SpinnerActivity.this, getString(R.string.network_failed), Toast.LENGTH_SHORT)
                        .show();
            }
        });
    }
Below is the SpinnerInterface which I am using.
 public interface SpinnerInterfaces {
    String JSONURL = "https://express-it.optusnet.com.au/";
    @GET("sample.json")
    Call<String> getJSONString();
}
This worked one month ago but suddenly it's not working when I checked this project today.
Gradle which I am using is:
implementation 'com.squareup.retrofit2:retrofit:2.5.0'
implementation 'com.squareup.retrofit2:converter-scalars:2.5.0'
I am getting Log error as:
 responsejavax.net.ssl.SSLHandshakeException: SSL handshake aborted: ssl=0xe631cdf8: I/O error during system call, Connection reset by peer
 responseretrofit2.ExecutorCallAdapterFactory$ExecutorCallbackCall@8cea2db
Edit:
I applied this answer but I am getting Log error as
E/response: responsejava.net.SocketTimeoutException: SSL handshake timed out