我在服务器上安装了Let's Encrypt SSL证书。使用Volley从我的Android应用程序执行HTTPS请求所需的步骤是什么。这是我目前的代码:
RequestQueue queue = Volley.newRequestQueue(this);
String url = getString(R.string.server_url);
StringRequest postRequest = new StringRequest(Request.Method.POST, url,
new com.android.volley.Response.Listener<String>()
{
@Override
public void onResponse(String response) {
// response
Log.d("Response", response);
}
},
new ErrorListener()
{
@Override
public void onErrorResponse(VolleyError error) {
// error
Log.d("Error.Response", error.toString());
}
}
) {
@Override
protected Map<String, String> getParams()
{
Map<String, String> params = new HashMap<String, String>();
params.put("imgUrl", mEdit.getText().toString());
params.put("token", userIdToken);
return params;
}
};
queue.add(postRequest);
我应该在此代码中添加什么内容?