could make this a one-liner:

    kwargs.setdefault('HTTP_X_REQUESTED_WITH', 'XMLHttpRequest')

but it works either way.