Skip to content

Cookie Management

Orhan Obut edited this page Aug 9, 2015 · 1 revision

You can easily handle cookies in two ways:

  • Set a CookiePolicy and let the CookieManager to use the default CookieStore implementation
  GitHubService service = new Wasp.Builder(this)    
        .setEndpoint("https://api.github.com")   
        .enableCookies(CookiePolicy.ACCEPT_ALL)     
        .build()                        
        .create(MyService.class);

Provide also your own implementation of CookieStore which will be used by CookieManager

  GitHubService service = new Wasp.Builder(this)    
        .setEndpoint("https://api.github.com")   
        .enableCookies(new YourCookieStore(), CookiePolicy.ACCEPT_ALL)   
        .build()                        
        .create(MyService.class);
Clone this wiki locally