title: HtmlUnit: making ajax call to get json data after login success
body: <p>I tried to login in some sites with HtmlUnit with this code: </p>
  
  <pre><code>    HtmlPage page1 = webClient.getPage("https://somesites.com/");
      HtmlForm form = (HtmlForm) page1.getElementById("FormLogin"); 
      HtmlInput name = form.getInputByName("user_name"); 
      name.setValueAttribute("my_password"); 
      HtmlInput password = form.getInputByName("password"); 
      password.setValueAttribute("my_password"); 
      HtmlButton button = (HtmlButton) page1.getElementById("btnX"); 
      HtmlPage page2 = button.click();
  </code></pre>
  
  <p>And this sites using ajax to show its data. But this ajax call can not be accomplish if login not succeeded. In chrome browser I can do this by typing in address bar like <a href="https://somesites.com/success/site.json" rel="nofollow noreferrer">https://somesites.com/success/site.json</a>  so If I delete some cookies variable this never return any result. </p>
  
  <p>My question was, how to make ajax call that maintain browser session after login success? </p>