Created
October 26, 2015 04:41
-
-
Save victorximenis/e77505f8b4fb6110b71e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.victor.organiccity.request; | |
import android.content.Context; | |
import com.android.volley.NetworkResponse; | |
import com.android.volley.Request; | |
import com.android.volley.RequestQueue; | |
import com.android.volley.Response; | |
import com.android.volley.toolbox.JsonObjectRequest; | |
import com.android.volley.toolbox.JsonRequest; | |
import com.android.volley.toolbox.StringRequest; | |
import com.android.volley.toolbox.Volley; | |
import com.example.victor.organiccity.LoginActivity; | |
/** | |
* Created by victor on 26/10/15. | |
*/ | |
public class LoginRequest { | |
private static final String URL = "https://www.eukip.com/aulas/getusuario.aspx?"; | |
private String resultRequest; | |
private String login; | |
private String password; | |
public void requestLogin(LoginActivity main, final Context context){ | |
RequestQueue requestQueue = Volley.newRequestQueue(context); | |
String urlToRequest = URL + "login=" + this.login + "&senha=" + this.password; | |
StringRequest stringRequest = new StringRequest(Request.Method.GET, urlToRequest, main, main); | |
requestQueue.add(stringRequest); | |
} | |
public String getLogin() { | |
return login; | |
} | |
public void setLogin(String login) { | |
this.login = login; | |
} | |
public String getPassword() { | |
return password; | |
} | |
public void setPassword(String password) { | |
this.password = password; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment