Anvil.http() add with_credential option

What I’m trying to do:
Making anvil.http requests to an app server that requires authentication cookies.

What I’ve tried and what’s not working:
This requires to pass the following option to $.ajax() (format is JSON)

{
    "xhrFields" : {
        "withCredentials" : true
    }
}

There is currently no way to do this with anvil.http. Propose to add a parameter: with_credentials=False which adds the required option to th $.ajax call when True.