有人帮我解决了这个错误 image of my screen
谢谢!
答案 0 :(得分:0)
您必须删除/添加ErrorListener
public class MyRequest {
private Context context;
private RequestQueue queue;
public MyRequest(Context context, RequestQueue queue) {
this.context = context;
this.queue = queue;
}
public void register(String pseudo, String password, String password2) {
String url = "http://192.168.56.1/don/connexion.php";
StringRequest request = new StringRequest(Request.Method.GET, url, new Response.Listener<String>() {
@Override
public void onResponse(String response) {
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
}
});
}
}
答案 1 :(得分:0)
关于发布请求的问题,但您的代码是获取请求....... 试试这个POST,
`%>%`(data, myFunction(...))
如果你需要使用Post方法
,你必须传递一些参数