Advertisement
Guest User

Untitled

a guest
Jan 20th, 2020
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. class CookieManager {
  2. getCookie(string url) {
  3. ...
  4. }
  5. putCookie(... cookie) {
  6. ...
  7. }
  8. }
  9.  
  10. class MyCookieManager extends CookieManager {
  11. List<Cookie> cookies = new List<Cookie>();
  12.  
  13. override putCookie(... cookie) {
  14. base.putCookie(... cookie); // This is calling the parent class's method
  15. cookies.add(cookie);
  16. }
  17. }
  18.  
  19. // So now in the MyCookieManager's cookies field you can reach all the cookies. You won't have to use the getCookie(string url) parameter.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement