Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- protected void onCreate(@Nullable Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.act_groups);
- get_groups();
- }
- void get_groups() {
- final String url = "http://192.168.215.2:8000/get_user2";
- final StringRequest stringRequest = new StringRequest(Request.Method.POST, url,
- new Response.Listener<String>() {
- @Override
- public void onResponse(String response) {
- Log.i("resp", response);
- }
- },
- new Response.ErrorListener() {
- @Override
- public void onErrorResponse(VolleyError error) {
- Log.i("err", error.getMessage());
- }
- }
- ) {
- @Override
- protected Map<String, String> getParams() throws AuthFailureError {
- Map<String, String> map = new Hashtable<String, String>();
- map.put("name", Base64.encodeToString("".getBytes(), Base64.DEFAULT));
- return map;
- }
- };
- RequestQueue requestQueue = Volley.newRequestQueue(ActGroups.this);
- requestQueue.add(stringRequest);
- }
Add Comment
Please, Sign In to add comment