Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- }
- });
- }
- private void sendRequestAndPrintResponse() {
- RequestQueue nRequestQueue = Volley.newRequestQueue(this);
- String url = "http://serverapi.respect-shoes.kz/ServerAPI/hs/Konversia";
- StringRequest stringRequest = new StringRequest(Request.Method.GET, url, new Response.Listener<String>() {
- @Override
- public void onResponse(String response) {
- Log.i(TAG, response);
- }
- }, new Response.ErrorListener() {
- @Override
- public void onErrorResponse(VolleyError error) {
- Log.i(TAG, "Error : " + error.toString());
- }
- });
- nRequestQueue.add(stringRequest);
- Authenticator.setDefault(new Authenticator() {
- protected PasswordAuthentication getPasswordAuthentication() {
- String username ="";
- String password ="";
- return new PasswordAuthentication(username, password.toCharArray());
- }
- });
- }
Add Comment
Please, Sign In to add comment