SessionCookieReader

Additional

Language
Java
Version
N/A
Created
Jan 3, 2016
Updated
May 28, 2019
Owner
Ludy (Ludy87)
Contributor
Ludy (Ludy87)
1
Activity
Badge
Generate
Download
Source code

Advertisement

CookieReader for Android

Cookie Reader of Session

add to App




build.gradlerepositories { jcenter() } dependencies { implementation 'org.astra_g:session_cookie_reader:2.+' } setTimeout(int timeout) set of: - setReadTimeout - setConnectTimeout new CookieReader(this).setTimeout(7000); /** * * @param parameterInterfaces Interface of CALLBACK, URL, POST PARAMETER, COOKIE NAME * @param contentType Enum | String * @param debug default false */ CookieReader(CookieParameterInterfaces parameterInterfaces, ContentType); CookieReaderSSL(CookieParameterInterfaces parameterInterfaces, ContentType); /** * * @param parameterInterfaces Interface of CALLBACK, URL, POST PARAMETER, COOKIE NAME * @param contentType Enum or String * @param debug boolean */ CookieReader(CookieParameterInterfaces, ContentType, Debug); CookieReaderSSL(CookieParameterInterfaces, ContentType, Debug); /** * * @param parameterInterfaces Interface of CALLBACK, URL, POST PARAMETER, COOKIE NAME * @param contentType default application/x-www-form-urlencoded * @param debug boolean */ CookieReader(CookieParameterInterfaces, Debug); CookieReaderSSL(CookieParameterInterfaces, Debug); /** * * @param parameterInterfaces Interface of CALLBACK, URL, POST PARAMETER, COOKIE NAME * @param contentType default application/x-www-form-urlencoded * @param debug default false */ CookieReader(CookieParameterInterfaces); CookieReaderSSL(CookieParameterInterfaces); public class Test extends Activity implements CookieParameterInterfaces { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); CookieReader cookieReader = new CookieReader(this); cookieReader.execute(); } @Override public String url() { return "https://mm.web.de/login"; } @Override public String cookieName() { return "JSESSIONID"; } @Override public HashMap<String, String> postParameter() { HashMap<String, String> param = new HashMap<String, String>(); param.put("username", "USERNAME"); param.put("password", "PASSWORD"); param.put("login", "Login"); return param; } @Override public CookieReaderInterfaces cookieCallback() { return new CookieReaderInterfaces() { @Override public void onCookieCall(String cookieValue) { Log.d("Cookie value", cookieValue); } }; } }