Page 395 - MDP2020-1
P. 395

················································································  명장양성프로젝트  【MDP】  과제발표회  자료집  Ⅰ    |  389


            }
            });
            }
            }





            RegisterRequest                         //회원가입  서버  요청
            package  com.example.s_mart;



            import  com.android.volley.AuthFailureError;
            import  com.android.volley.Response;
            import  com.android.volley.toolbox.StringRequest;


            import  java.util.HashMap;

            import  java.util.Map;


            public  class  RegisterRequest  extends  StringRequest  {



            //  서버url  설정(php파일  연동)
            final  static    private  String  URL="http://inmagosmart.dothome.co.kr/register.php";
            private  Map<String,String>map;


            public  RegisterRequest(String  userID,  String  userPassword,  String  userName,  String
            userAge,  Response.Listener<String>listener){

            super(Method.POST    ,URL ,listener,null);              //  위url에post방식으로  값을  전송


            map=new  HashMap<>();
            map.put("userID",userID);
            map.put("userPassword",userPassword);

            map.put("userName",userName);
            map.put("userAge",userAge);


            }
            //.

            @Override
            protected  Map<String,  String>  getParams()  throws  AuthFailureError  {
            return  map;
            }
            }
   390   391   392   393   394   395   396   397   398   399   400